重要人物:利库布拉斯.8.0:无法打开共享对象fi

2024-10-05 10:44:25 发布

您现在位置:Python中文网/ 问答频道 /正文

我安装了tensorflow gpu。我正在使用Tensorflow的virtualenv安装。在

Ubuntu version 16.04
Cuda compilation tools, release 7.5, V7.5.17
Nvidia Driver:390 (latest)

我已经将cuda链接到我的.bashrc:

^{pr2}$

当我尝试:

import tensorflow as tf

我收到以下错误:

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

如何解决这个问题?在


Tags: inpyimporthomelibtensorflowlineload
1条回答
网友
1楼 · 发布于 2024-10-05 10:44:25

在上一次apt升级之后,我在ubuntu16.04上的nvidia-390.30和cuda9.1也遇到了同样的问题。 缺少nvidia smi命令。 /usr/local/cuda/extras/demo_suite/deviceQuery返回错误35。在

问题浮出水面是因为当我运行以下命令时:

# prime-select query

它正在返回未定义的

由于我的板上没有intel GPU,所以我以root用户身份运行以下命令

^{pr2}$

然后重新登录,因为它调整了用户配置文件和其他链接。 现在CUDA9.1可以很好地与Nvidia驱动程序390.30:),同时Nvidia smi命令也开始工作。在

注意:使用Optimus设置(Intel GPU)的用户可能希望尝试以下操作:

# prime-select intel

我跑了

/usr/local/cuda/extras/demo_suite/deviceQuery

它完美地检测到了这个装置。在

相关问题 更多 >

    热门问题