gpt4 book ai didi

python - "ImportError: libcublas.so.10.0"仅在使用 GUI 时用于 Tensorflow

转载 作者:太空宇宙 更新时间:2023-11-04 11:52:14 25 4
gpt4 key购买 nike

我有 Centos7 最小安装和 GNOME 桌面。我主要使用远程终端,但在使用相机时我使用 GUI。

以下是我使用的程序/包:

  • python 3.4.9
  • Tensorflow-GPU 1.13.1
  • 库达 10.0
  • Nvidia 驱动程序 481.56

当我使用终端并导入 tensorflow 时,一切都按预期运行。

当我启动 GUI 并尝试在 GUI 终端上导入 tensorflow 时,出现典型的导入错误:

>>>import tensorflow as tf
Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/lib/python3.4/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/lib64/python3.4/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
ImportError: libcublas.so.10.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.4/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/usr/lib/python3.4/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/lib/python3.4/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/lib/python3.4/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/lib64/python3.4/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.

See https://www.tensorflow.org/install/errors

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

同样,当我在没有 GUI 的终端上运行它时,我没有收到此错误。即使当我调出 GUI 并遇到此导入错误时,我也会通过 SSH 连接到我的机器,并且我仍然能够在 SSH 窗口中导入 tensorflow。

我的路径应该没问题,因为它再次成功导入,只是在 GUI 上导入时没有。这是一个非常奇怪的问题,我完全不知道为什么会这样。

我还尝试了各种兼容版本的 tensorflow 和 Cuda 以及其他桌面。我仍然遇到这个问题。

我想补充一点,我最近重新安装了所有东西,只是将我的/home 目录复制到新安装的目录中。所以在此之前,无论有没有 GUI,一切都运行良好。

最佳答案

这很奇怪。该错误表示找不到 CUDA10 文件 (libcublas.so.10.0) 的路径。但是,如果您在 SSH 窗口中导入 TF,它不会报错。使用 GUI 打开时是否有任何防火墙或任何限制?谢谢!

关于python - "ImportError: libcublas.so.10.0"仅在使用 GUI 时用于 Tensorflow,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55740298/

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