而导入python.ImportError:libcublas.so.9.0:无法打开共享对象文件:没有这样的文件或目录

Zay*_*rai 3 python archlinux tensorflow

我尝试了许多解决方案,例如从不同来源安装官方谷歌链接Google.api...,pypi以及从git repo构建.

但每次我都面临同样的问题 ImportError: libcublas.so.9.0:

操作系统:Linux Archtensorflow:tensorflow-gpu版本1.5

NVIDIA: Cuda 9.1 and Cudnn 7.0.5

注意:tensorflow cpu工作正常

Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/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.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 "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/usr/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/usr/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/usr/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/usr/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.9.0: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.


for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.
Run Code Online (Sandbox Code Playgroud)

Rob*_*obR 5

您的错误消息表明Tensorflow正在寻找CUDA 9.0,而默认下载是CUDA 9.1.我建议下降到CUDA 9.0.我刚刚用CUDA 9.0和相应的cudnn 7.05安装了TF预构建的二进制文件,一切运行正常.从这里这里,似乎CUDA 9.1仍有一些问题需要解决.

另请注意,目前TF 1.5安装指南似乎不正确,因为它为预构建的TF指定了CUDA 8.0和cudnn 6.0,而发行说明指定了cuda 9和cudnn 7