python - 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 解决。第一次的原因仍然未知。
解决方案
是的 tensorflow,可怕的安装!您最好使用虚拟环境并使用具有本地要求的 tf-nightly 包(因为它对各种其他包的版本感到恐慌,praw 会痛苦地想到)。
推荐阅读
- javascript - 除 [Value] 外的正则表达式
- javascript - 将参数拆分为一个数组,现在在子范围内得到一个未定义的
- forms - 我的提交按钮没有用 symfony 发送我的表单
- spring-integration - Spring Integration 配置文件中的环境特定 url
- pandas - 我怎样才能将每月的熊猫系列重新索引为分钟,并在该月的结果天的每一天都有对应于月份的值?
- python - 如何从发布请求中拆分正文
- node.js - 需要帮助了解我的应用程序如何启动
- javascript - 从 vue 指令操作目标的 dom
- matlab - Matlab 使 plot3 看起来像曲面图
- php - 一次考虑一个数组元素