我试图在运行anaconda python 2.7.13的Windows 7机器上安装tensorflow。
C:\>python -V
Python 2.7.13 :: Anaconda 4.3.1 (64-bit)
我从:
开始conda create -n tensorflow python=2.7
这提示我继续,我说是的,它安装了几个包没有问题(似乎都指向2.7版本的python)。
接下来我使用:
conda install -c conda-forge tensorflow
这给了我这个错误:
UnsatisfiableError: The following specifications were found to be in conflict:
- python 2.7*
- tensorflow -> python 3.5*
Use "conda info <package>" to see the dependencies for each package.
有任何建议如何解决这个问题?
编辑:我也试过这个:C:\>pip3 install --upgrade tensorflow
'pip3' is not recognized as an internal or external command,
operable program or batch file.
下一步:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-1.1.0-cp35-cp35m-win_amd64.whl
并收到此错误消息:
tensorflow-1.1.0-cp35-cp35m-win_amd64.whl is not a supported wheel on this platf
orm.
答案 0 :(得分:0)
您是否有理由使用Python 2.7?如果您从:
开头$ conda create -n tensorflow python=3.6
您应该能够按照自己的方式安装它,并运行最新版本来启动!否则,您可以尝试installing TensorFlow r0.12.1 with pip
:
$ source activate tensorflow
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.1-cp27-none-linux_x86_64.whl
$ pip install --ignore-installed --upgrade $TF_BINARY_URL
如果您需要GPU支持,请将上面的export
行替换为:
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-0.12.1-cp27-none-linux_x86_64.whl
我认为自从TF 1.0.1问世以来,pip
是首选的安装方法。如果我不得不猜测,他们通过conda-forge
更改了可用的软件包,最新版本不适用于Python 2.7(或至少该版本不适用于conda-forge)。我可能是错的,但无论哪种方式,这都应该让你在那里。