可能重复此问题. 我有一个gpu帐户,我通过putty连接(ssh登录).我在那里创建了一个virtualenv,我正在通过pip为gpu安装tenorflow.当我运行命令时,一切正常
$ pip list
Run Code Online (Sandbox Code Playgroud)
正在显示以下列表:
backports.weakref (1.0rc1)
bleach (1.5.0)
funcsigs (1.0.2)
html5lib (0.9999999)
Markdown (2.6.8)
mock (2.0.0)
numpy (1.13.1)
olefile (0.44)
pbr (3.1.1)
Pillow (4.2.1)
pip (9.0.1)
protobuf (3.3.0)
setuptools (36.0.1)
six (1.10.0)
tensorflow-gpu (1.2.1)
Werkzeug (0.12.2)
wheel (0.29.0)
Run Code Online (Sandbox Code Playgroud)
但是当我跑步时:
$ python
>>> import tensorflow
Run Code Online (Sandbox Code Playgroud)
它显示以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/nauman/junaid/final/test/lib/python2.7/site-
packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/nauman/junaid/final/test/lib/python2.7/site-
packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import …Run Code Online (Sandbox Code Playgroud)