在Windows上使用Pip Python安装TensorFlow
上个月,他们发布了与Windows的张量流可比性。看看我已经安装了python 3.6的文档并运行在Windows上使用Pip Python安装TensorFlow
pip install tensorflow-gpu
但它没有找到它,因此不会安装它。
could not find a version that satisfies the requirements tensorflow-gpu(from versions)
我是否缺少一些基本的东西?我该如何解决或绕过这个?
适用于Windows的Python 3.6的稳定版已于2016年12月23日发布,并且我们尚未为该版本构建TensorFlow软件包。 (假期后我们会考虑这样做)。现在,您的最佳选择是:
- 降级到预构建软件包支持的Python 3.5(64位版本)。
- 尝试building TensorFlow from source。
这是我为了使tensorflow与windows一起工作而做的。
Download蟒蛇3.5.0(从Python Releases for Windows 64位) 安装它,并通过在cmd中运行以下命令来检查Python版本:
python --version
Python 3.5.0
然后运行命令如下升级画中画最新
python -m pip install --upgrade pip
现在使用pip安装tensorflow
pip install tensorflow
就是这样,你已经在Windows上安装了tensorflow。下图显示当您键入上述命令时发生的情况
Example验证tensorflow是否正常工作。
$ python
...
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
感谢它的工作 – Hamza
很高兴它帮助干杯:) –
'PIP安装--upgrade https://开头storage.googleapis.com/tensorflow /窗/ GPU/tensorflow_gpu-0.12.0-CP35-cp35m-win_amd64.whl' – Natecat