使用Python35在Windows 10中安装Tensorflow

使用Python35在Windows 10中安装Tensorflow,windows,python-3.x,tensorflow,installation,Windows,Python 3.x,Tensorflow,Installation,我想在Windows10中使用Tensorflow(仅支持CPU)。我尝试了以下命令来使用pip安装,但没有成功。你知道怎么解决这个问题吗 C:/Python35/Scripts/pip install --upgrade tensorflow 在Comman提示符下运行此命令会出现以下错误: Collecting tensorflow Could not find a version that satisfies the requirement tensorflow (from versio

我想在Windows10中使用Tensorflow(仅支持CPU)。我尝试了以下命令来使用pip安装,但没有成功。你知道怎么解决这个问题吗

C:/Python35/Scripts/pip install --upgrade tensorflow
在Comman提示符下运行此命令会出现以下错误:

Collecting tensorflow
Could not find a version that satisfies the requirement tensorflow (from versions: )
No matching distribution found for tensorflow
我还尝试使用pip3或URL安装:

    C:\>C:/Python35/Scripts/pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.0.0-cp35-cp35m-win_amd64.whl
tensorflow-1.0.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

但没有一个成功

前几天,当我的
pip
版本过时时,我就遇到了这个问题。在控制台中键入
pip--version
时,您有什么版本


我建议运行
pip安装--升级pip
以将其更新为最新版本,然后重试。

重新安装了Python35并使用了以下软件包:

使用命令:

pip install "tensorflow-1.1.0rc2-cp35-cp35m-win_amd64.whl"
我能够在windows上正确运行tensorflow。运行Tensorflow示例代码时,您可能会收到多个警告,例如:

2017-04-19 16:35:22.533979: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE instructions, but these are available on your machine and could speed up CPU computations. 2017-04-19 16:35:22.534756: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE2 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-19 16:35:22.535027: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE3 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-19 16:35:22.535245: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-19 16:35:22.535462: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-19 16:35:22.535680: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-04-19 16:35:22.536664: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-04-19 16:35:22.536925: W c:\tf_jenkins\home\workspace\release-win\device\cpu\os\windows\tensorflow\core\platform\cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations. b'Hello, TensorFlow!'
要解决此问题,可以使用以下代码使TF发出的警告静音:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'

pip版本应>9.0 尝试升级pip:

python -m pip install -U pip

Tensorflow的最新库不适用于win64上的最新python,您需要降级到python 3.5.x

在win7 Enterprise(64位,英特尔i5)上测试:


anaconda默认基于python 3.6,而不是支持tensorflow的3.5xx。按照此链接中的指南操作:

谢谢您的回答。经过几次尝试后,我重新安装了Python35,并使用新的源代码包1.1.0进行安装,问题得到了解决。
devlab@Ubuntu19 ~/Downloads
$ python --version
Python 3.5.3


devlab@Ubuntu19 ~/Downloads
$ pip install tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
Processing c:\users\xt21966\downloads\tensorflow-1.1.0-cp35-cp35m-
win_amd64.whl
Collecting six>=1.10.0 (from tensorflow==1.1.0)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting protobuf>=3.2.0 (from tensorflow==1.1.0)
Downloading protobuf-3.3.0.tar.gz (271kB)
Collecting wheel>=0.26 (from tensorflow==1.1.0)
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
Collecting werkzeug>=0.11.10 (from tensorflow==1.1.0)
Downloading Werkzeug-0.12.2-py2.py3-none-any.whl (312kB)
Collecting numpy>=1.11.0 (from tensorflow==1.1.0)
Downloading numpy-1.12.1-cp35-none-win_amd64.whl (7.7MB)
Requirement already satisfied: setuptools in 
c:\users\xt21966\appdata\local\programs\python\python35\lib\site-packages 
(from protobuf>=3.2.0->tensorflow==1.1.0)
Installing collected packages: six, protobuf, wheel, werkzeug, numpy, 
tensorflow
Running setup.py install for protobuf: started
Running setup.py install for protobuf: finished with status 'done'
Successfully installed numpy-1.12.1 protobuf-3.3.0 six-1.10.0 tensorflow-1.1.0 werkzeug-0.12.2 wheel-0.29.0