ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory

我的环境是ubuntu 18.04, tensorflow-gpu 1.4,cuda 9.0, cudnn 7.0然后在运行的时候出现了下面的错误:

Traceback (most recent call last):
  File "/home/eric/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in 
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/eric/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in 
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/eric/.local/lib/python3.6/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 "/usr/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libcublas.so.8.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 "tensorflow-gpu-test.py", line 1, in 
    import tensorflow as tf
  File "/home/eric/.local/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in 
    from tensorflow.python import *
  File "/home/eric/.local/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in 
    from tensorflow.python import pywrap_tensorflow
  File "/home/eric/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in 
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/eric/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in 
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/eric/.local/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in 
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/eric/.local/lib/python3.6/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 "/usr/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/usr/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libcublas.so.8.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.

解决方法

pip3 install tensorflow-gpu==1.8

把tensorflow升级几个版本就行了,tensorflow 1.4以下的版本貌似都不行。

 

你可能感兴趣的:(linux学习,tensorflow,python学习)