[root@test888 Python-3.7.2]# pip install tensorflow
Downloading/unpacking tensorflow
Could not find any downloads that satisfy the requirement tensorflow
Cleaning up...
No distributions at all found for tensorflow
Storing debug log for failure in /root/.pip/pip.log
试过好几个版本都报相同的错误,不支持平台。
2. 换命令 pip3 install tensorflow 安装。
遇到如下问题:
Downloading/unpacking tensorflow
Could not find any downloads that satisfy the requirement tensorflow
Cleaning up...
No distributions at all found for tensorflow
Storing debug log for failure in /home/itcast/.pip/pip.log
(1) 有说tensorflow不支持32位系统只支持64位系统的,特意用命令sudo uname --m查看系统是x86_64,说明是64位。
另 查到这个问题原因是: pip3的版本太低。
使用命令 pip3 -V 可查看版本:pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)
参考:ubuntu14 上安装tensorflow 遇到的问题_sisiel的博客-CSDN博客, 如何升级pip3?_夏雨淋河的博客-CSDN博客。
(2) 然后使用网上公认的升级命令: pip3 install --upgrade pip
此次升级可行,如果不行可参考 如何升级pip3?_夏雨淋河的博客-CSDN博客 :
$ sudo easy_install --upgrade pip #运行后解决问题。
$ sudo easy_install --upgrade six #这个不用也行
(3) 然后再执行 pip3 install tensorflow 可以顺利往下走了,然后遇到如下问题:
Cannot uninstall 'six'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
3. 使用 sudo pip3 install --ignore-installed six 命令安装好six
此命令借鉴于:cannot uninstall a distutils installed project'_xiaoxianerqq的博客-CSDN博客 。
然后继续 pip3 install tensorflow 终于安装完成了。
4. 测试
$ python3
Python 3.4.3 (default, Nov 28 2017, 16:41:13)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
>>> tensorflow.constant(3)
>>>
应该可以正常使用了。