gpt4 book ai didi

python - Tensorflow-ImportError : libcublas. so.8.0:无法打开共享对象文件:没有这样的文件或目录

转载 作者:行者123 更新时间:2023-12-01 01:47:50 24 4
gpt4 key购买 nike

我正在尝试运行 Tensorflow-gpu .

我安装了 Cuda-9.0 和 cuDNN v7.0.3。我测试了两者(如他们的指南中所述)并且它们工作正常。

然后我使用 pip3(我使用 python3)安装了 Tensorflow-gpu,它在导入时给了我这个错误:

Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-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.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, 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 "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-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.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, 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.

我发现了一些类似的问题,但都是针对某些或其他以前版本的 Cuda(主要是 8.0),我不确定它们是否会起作用。我也尝试了其中的一些,比如设置 LD_LIBRARY_PATH但没有任何效果。我还尝试了错误本身中的链接,但这也是 cuda 8.0 的解决方案

最佳答案

目前,TF-GPU 的二进制可安装版本需要 CUDA 8。这在 future 可能会改变,但对于这些二进制文件,您无法满足 CUDA 9 的要求。

如果您真的想使用 CUDA 9/CUDNN 7,则需要从源代码构建 TF。否则安装 CUDA 8 并指向 TF。 CUDA 8可以和CUDA 9一起安装,不需要修改驱动; CUDA 9 GPU 驱动程序将与 CUDA 8 安装一起使用。

您可以在此处的答案中查看更多详细信息:
https://devtalk.nvidia.com/default/topic/1026198/cuda-9-0-importerror-libcublas-so-8-0/

我希望这会有所帮助:D

关于python - Tensorflow-ImportError : libcublas. so.8.0:无法打开共享对象文件:没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47270885/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com