首页 > 解决方案 > Ubuntu16.04 python3.6.5无法安装tensorflow

问题描述

尝试在我的 ubuntu 桌面上安装 tensorflow cpu 版本时遇到问题。

我尝试了两个:

1.pip3 install tensorflow

这里的错误:

Could not find a version that satisfies the requirement tensorflow (from versions: )
    No matching distribution found for tensorflow

2.pip3 install tensorflow-1.8.0-cp36-cp36m-manylinux1_x86_64.whl

tensorflow-1.8.0-cp36-cp36m-manylinux1_x86_64.whl is not a supported wheel on this platform.

我搜索了很多,发现可能与 pip 版本、架构等有关。

但是,似乎这些在我的桌面上是正确的,这是我的检查:

148 wni@wni-GE62-2QC:~⟫ uname -i
x86_64
wni@wni-GE62-2QC:~⟫ 
wni@wni-GE62-2QC:~⟫ cat /etc/issue
Ubuntu 16.04.4 LTS \n \l

wni@wni-GE62-2QC:~⟫ 
wni@wni-GE62-2QC:~⟫ pip3 -V
pip 10.0.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
wni@wni-GE62-2QC:~⟫ 
wni@wni-GE62-2QC:~⟫ 
wni@wni-GE62-2QC:~⟫ python
Python 3.6.5 (default, May 12 2018, 17:43:57) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import platform
>>> platform.architecture()
('64bit', 'ELF')
>>> 
>>> import struct
>>> struct.calcsize('P')
8

更何况pip3搜索tensorflow可以找到tensorflow 1.8.0。

嗯……有人知道怎么回事吗?

谢谢。

[编辑] 通过从源重新安装 Python3.6.5 解决。第一次的原因仍然未知。

标签: pythontensorflow

解决方案


是的 tensorflow,可怕的安装!您最好使用虚拟环境并使用具有本地要求的 tf-nightly 包(因为它对各种其他包的版本感到恐慌,praw 会痛苦地想到)。


推荐阅读