简体   繁体   English

无法 pip install tensorflow(不再)

[英]unable to pip install tensorflow (anymore)

Until recently I was able to install the tensorflow 1.5.0 package when using python 3.6.7 on windows.直到最近,我才能够在 Windows 上使用 python 3.6.7 时安装 tensorflow 1.5.0 包。 Now I can't and from the message "from version" below it seems that no tensorflow package is available at all.现在我不能,从下面的“来自版本”的消息看来,似乎根本没有可用的 tensorflow 包。

Did the support stop recently?支持最近停止了吗?

Some additional information taking into account the comments from micha137 and hoefling:考虑到 micha137 和 hoefling 的评论的一些附加信息:

In linux, tensorflow is available in many flavors.在 linux 中,tensorflow 有多种形式。 This is the case with pip version 9.0.3, 10.0.1, and 18.1 I tried.我试过的 pip 版本 9.0.3、10.0.1 和 18.1 就是这种情况。

For example:例如:

(env3)xxx@xxx-linux:/local/mnt/workspace/tmp$ pip install tensorflow==
Collecting tensorflow==
  Could not find a version that satisfies the requirement tensorflow== (from versions: 0.12.0rc0, 0.12.0rc1, 0.12.0, 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0)
No matching distribution found for tensorflow==
(env3)xxx@xxx-linux:/local/mnt/workspace/tmp$ pip --version
pip 18.1 from /local/mnt/workspace/tmp/env3/lib/python3.4/site-packages/pip (python 3.4)

By contract, in Windows:根据合同,在 Windows 中:

C:\tmp>pip --version
pip 18.1 from c:\users\xxx\appdata\local\programs\python\python36-32\lib\site-packages\pip (python 3.6)

C:\tmp>pip install tensorflow==
Collecting tensorflow==
  Could not find a version that satisfies the requirement tensorflow== (from versions: )
No matching distribution found for tensorflow==

Some additional information:一些附加信息:

C:\tmp>pip install -vvv tensorflow. -
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\xxx\AppData\Local\Temp\pip-ephem-wheel-cache-fmlkvkla
Created temporary directory: C:\Users\xxx\AppData\Local\Temp\pip-req-tracker-oijk67__
Created requirements tracker 'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-req-tracker-oijk67__'
Created temporary directory: C:\Users\xxx\AppData\Local\Temp\pip-install-tt2d7lx0
Cleaning up...
Removed build tracker 'C:\\Users\\xxx\\AppData\\Local\\Temp\\pip-req-tracker-oijk67__'
Invalid requirement: 'tensorflow.'

Followed by a lengthy traceback.随后是冗长的追溯。

And:和:

C:\tmp>python -c "from setuptools import pep425tags; print(pep425tags.get_supported()[0])"
c:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\pep425tags.py:89: RuntimeWarning: Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):
c:\Users\xxx\AppData\Local\Programs\Python\Python36-32\lib\site-packages\setuptools\pep425tags.py:93: RuntimeWarning: Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
  warn=(impl == 'cp')):
('cp36', 'cp36m', 'win32')

Judging by the output of 从输出判断

python -c "from setuptools import pep425tags; print(pep425tags.get_supported()[0])"
('cp36', 'cp36m', 'win32')

you have the supported Python version, but a 32 bit distribution installed (the platform tag is win32 ; for 64 bit Python on Windows, it should be win_amd64 ). 您具有受支持的Python版本,但安装了32位发行版(平台标记为win32 ;对于Windows上的64位Python,应为win_amd64 )。 Tensorflow is available for 64 bit distributions only ( all the wheels on PyPI have platform tag either macosx_10_11_x86_64 for MacOS, or manylinux1_x86_64 for Linux, or win_amd64 for Windows). Tensorflow仅适用于64个分布( 所有PyPI上的车轮具有平台标签要么macosx_10_11_x86_64适用于MacOS,或manylinux1_x86_64对于Linux或win_amd64适用于Windows)。 Installing the 64 bit Python (eg from python-3.6.8-amd64.exe ) will do the trick. 安装64位Python(例如,从python-3.6.8-amd64.exe )即可解决问题。

You could try to list the available versions : 您可以尝试列出可用的版本

$ pip.exe install tensorflow==
Collecting tensorflow==
   Could not find a version that satisfies the requirement tensorflow== (from ver sions: 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7. 0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9 .0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0)
No matching distribution found for tensorflow==

try pip3 install tensorflow 尝试pip3 install tensorflow

if you haven't installed pip3. 如果尚未安装pip3。 Do it first. 先做

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM