1:从官网下载anaconda
2:安装anaconda
3:在cmd下运行conda info --envs查看当前安装环境
4:激活TensorFlow环境 activate tensorflow
5:在此环境下安装TensorFlow pip install tensorflow
6:安装完成后打开anaconda prompt
7:切换到TensorFlow环境 activate tensorflow
8:切换到编程环境,直接在后面打python
9:输入代码
import tensorflow as tf
hello = tf.constant('hello tensorflow')
sess = tf.Session()
print(sess.run(hello))
如果输出b'hello tensorflow',恭喜你,表示安装成功了
其中如果你想卸载已经安装的TensorFlow 可以使用pip uninstall tensorflow命令
如果你在第9步导入TensorFlow时,提示Dll load failed with error可能你安装的TensorFlow版本太高可以卸载后再用pip install tensorflow ==1.5进行安装
这是我的一些安装过程,希望可以帮助大家