我已经安装了8.0版的cuda。我在虚拟环境中使用pip安装了tensorflow-gpu

时间:2018-10-23 15:52:52

标签: python tensorflow cuda virtualenv

我遇到以下问题:

Traceback (most recent call last):
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/soroy/venv/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/soroy/venv/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "tensorflowtest.py", line 3, in <module>
import tensorflow as tf
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/__init__.py", line 22, in <module>
from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
 File "/home/soroy/venv/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/soroy/venv/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/soroy/venv/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/install_sources#common_installation_problems

for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

我正在尝试运行以下链接https://learningtensorflow.com/lesson10/

中的代码

我不明白为什么它会显示此错误。 我尝试过不同版本的tensorflow-gpu,尝试运行代码时遇到相同的错误。我已经在虚拟环境中使用pip管理器安装了tensorflow-gpu。

0 个答案:

没有答案