简体   繁体   English

仅在使用GUI时Tensorflow的“ImportError:libcublas.so.10.0”

[英]“ImportError: libcublas.so.10.0” for Tensorflow ONLY when using GUI

I have the Centos7 minimal installation with the GNOME desktop installed on as well. 我安装了GNOME桌面的Centos7最小安装。 I mainly use the terminal remotely but I use the GUI when working with the camera. 我主要远程使用终端,但在使用相机时我使用GUI。

Here are the programs/packages that I use: 这是我使用的程序/包:

  • Python 3.4.9 Python 3.4.9
  • Tensorflow-gpu 1.13.1 Tensorflow-gpu 1.13.1
  • Cuda 10.0 Cuda 10.0
  • Nvidia Drivers 481.56 Nvidia Drivers 481.56

When I am using the terminal and import tensorflow, everything runs as it should. 当我使用终端并导入tensorflow时,一切都按预期运行。

When I start up the GUI and try to import tensorflow on the GUIs terminal, I get the typical import error: 当我启动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.

Again, I do not get this error when I run it on the terminal WITHOUT the GUI. 再次,当我在没有GUI的终端上运行它时,我没有收到此错误。 Even when I bring up the GUI and get this import error, I'll SSH into my machine and I'll still be able to import tensorflow on the SSH window. 即使我打开GUI并获得此导入错误,我也将SSH进入我的机器,我仍然可以在SSH窗口上导入tensorflow。

My paths should be fine because, again, it successfully imports, just not when importing it on the GUI. 我的路径应该没问题,因为它再次成功导入,而不是在GUI上导入时。 This is a really weird issue and I am completely lost as to why this is happening. 这是一个非常奇怪的问题,我完全不知道为什么会这样。

I have also tried various, compatible, versions of tensorflow and Cuda and other Desktops. 我还尝试了各种兼容的tensorflow和Cuda以及其他桌面版本。 I still get this issue. 我仍然遇到这个问题。

I want to add that I recently reinstalled everything and just copied over my /home directory into the new installation. 我想补充一点,我最近重新安装了所有内容,只是将我的/ home目录复制到新安装中。 So before this, everything worked fine with or without the GUI. 所以在此之前,无论有没有GUI,一切都运行良好。

This is strange. 这很奇怪。 The error says that it could not find path to CUDA10 file (libcublas.so.10.0). 错误说它找不到CUDA10文件的路径(libcublas.so.10.0)。 However it is not complaining if you import TF on the SSH window. 但是,如果在SSH窗口中导入TF,则不会抱怨。 Is there any Firewalls or any restrictions acting when you open with GUI? 使用GUI打开时是否有任何防火墙或任何限制? Thanks! 谢谢!

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Google Colaboratory ImportError:libcublas.so.10.0:无法打开共享对象文件:运行时没有这样的文件或目录 - Google Colaboratory ImportError: libcublas.so.10.0: cannot open shared object file: No such file or directory when running Tensorflow 只显示“在本地成功打开 CUDA 库 libcublas.so.10.0”,而没有关于 cudnn - Tensorflow shows only "successfully opened CUDA library libcublas.so.10.0 locally" and nothing about cudnn 使用tensorflow-gpu后端导入Keras时出错(找不到libcublas.so.10.0) - Error in importing Keras with tensorflow-gpu backend (can't find libcublas.so.10.0) 使用CUDA8.0和cuDNN5.1安装tensorflow1.2时显示&#39;ImportError:libcublas.so.9.0&#39; - Install tensorflow1.2 with CUDA8.0 and cuDNN5.1 shows 'ImportError: libcublas.so.9.0' Tensorflow-ImportError:libcublas.so.8.0:无法打开共享对象文件:没有这样的文件或目录 - Tensorflow- ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory 完成更新和升级后,现在得到tensorflow ImportError:libcublas.so.8.0无法 - After doing update and upgrade, now get tensorflow ImportError: libcublas.so.8.0 cannot Tensorflow 2.3 和 libcublas.so.10 - Tensorflow 2.3 and libcublas.so.10 张量流的libcublas.so.8.0错误 - libcublas.so.8.0 error with tensorflow ImportError:libcublas.so.9.0:无法打开共享对象文件:在Ubuntu 16.04.03上安装张量流时没有这样的文件或目录 - ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory when installing tensor flow on Ubuntu 16.04.03 CUDA libcublas.so.11 在 ONNX Docker 容器内使用 GPU 时出错 - CUDA libcublas.so.11 Error when using GPUs inside ONNX Docker Container
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM