尝试从源代码安装tensorflow

时间:2018-06-29 22:47:38

标签: python tensorflow

每当我尝试运行tensorflow时,都会出现以下错误:

Your CPU supports instructions that this TensorFlow binary was not comipled to use: AVX2

首先,我尝试并搜索了这个问题,并找到了几个答案。其中之一是使用命令升级tensorflow:

pip install --ignore-installed --upgrade "DOWNLOAD URL"

在这里我用张量流的链接替换了DOWNLOAD URL,该链接明确表示支持AVX2,FMA,等,但是直到我对FMA感到满意时,我才遇到相同的错误。

现在,我尝试从源代码安装它。而且(我认为)我做到了。我已经完成了文档中的所有步骤,最后,我已经安装了/tmp/tensorflow_pkg/tensorflow-1.9.0rc0-cp35-cp35m-linux_x86_64.whl。之后,按照文档中所述更改目录,尝试运行tensorflow,但随后得到以下信息:

Successfully installed absl-py-0.2.2 astor-0.6.2 bleach-1.5.0 gast-0.2.0 grpcio-1.13.0 html5lib-0.9999999 markdown-2.6.11 numpy-1.14.5 protobuf-3.6.0 tensorboard-1.8.0 tensorflow-1.9.0rc0 termcolor-1.1.0 werkzeug-0.14.1
root@cepa995-VirtualBox:/home/cepa995/tensorflow# clear
root@cepa995-VirtualBox:/home/cepa995/tensorflow# cd
root@cepa995-VirtualBox:~# python
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> print(sys.version)
2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609]
>>> import tensorflow as tf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named tensorflow

如果有人知道发生了什么,我将不胜感激

0 个答案:

没有答案