【Anaconda下安装TensorFlow环境和jupyter】TensorFlow版本众多,不同版本之间差异比较大,以安装TensorFlow1.4为例介绍创建流程。安装其他版本的步骤类似。
安装TensorFlow1.4
1. 打开Anaconda Prompt
2. 创建tensorflow1.4环境
环境命名为tensorflow1.4,我的python是3.6的,根据个人python版本的不同,自行修改
conda create -n tensorflow1.4 python=3.6conda info -econda activate tensorflow1.4pip install -i https://pypi.tuna.tsinghua.edu.cn/simple/ --upgrade tensorflow==1.4import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')#初始化一个TensorFlow的常量
sess = tf.Session()#启动一个会话
print(sess.run(hello))
conda install ipythonconda install jupyteripython kernelspec install-self --user
【Anaconda下安装TensorFlow环境和jupyter】TensorFlow版本众多,不同版本之间差异比较大
以安装TensorFlow1.4为例介绍创建流程。安装其他版本的步骤类似。