Window10系统安装TensorFlow,记录一下。TensorFlow官网www.tensorflow.org由于众所周知的原因访问比较慢,有时甚至连接不上,可以参考https://tensorflow.google.cn/这个网站。现在安装TensorFlow不想之前那么难装了(各种安装问题,各种不支持,各种错误……),几乎是傻瓜式的了。
安装前的准备
1:确认已通过Anaconda安装Python
2:确认已安装pip
如下是我的系统安装的版本:
安装过程
Win+R,输入cmd,打开命令行输入:pip install tensorflow
开始下载:
安装完成:
整个安装过程有可能比较长,可能会下载超时,出现超时重新输入命令,多试几次就好了,我就试了不下10次,才好。
安装验证
打开PyCharm,输入验证程序:
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
输入如下,安装成功:
D:\AppData\Anaconda3\python.exe D:/Python/TensorflowDemo/InstallTest.py
2018-01-10 21:26:07.291278: I C:\tf_jenkins\home\workspace\rel-win\M\windows\PY\36\tensorflow\core\platform\cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
b'Hello, TensorFlow!'
Process finished with exit code 0
本文介绍如何在Windows10系统上使用Anaconda和pip安装TensorFlow,并提供了安装步骤及验证方法。
2678

被折叠的 条评论
为什么被折叠?



