ImportError:libcusolver.so.8.0:在Pycharm中运行时无法打开共享对象文件

时间:2017-10-20 06:33:55

标签: python pycharm tensorflow-gpu

运行一段代码时出现以下错误。在运行" sudo apt install update"之前,一切正常。命令。

我在Pycharm中运行了一段代码,我收到以下错误:

Using TensorFlow backend.
Traceback (most recent call last):
  File "/home/uday/Academics/asu-deep-learning-networks/Graph-Signal-Processing/Code/GCN_Hinge.py", line 3, in <module>
    from keras.layers import Input, Dropout
  File "/home/uday/anaconda2/lib/python2.7/site-packages/keras/__init__.py", line 3, in <module>
    from . import utils
  File "/home/uday/anaconda2/lib/python2.7/site-packages/keras/utils/__init__.py", line 6, in <module>
    from . import conv_utils
  File "/home/uday/anaconda2/lib/python2.7/site-packages/keras/utils/conv_utils.py", line 3, in <module>
    from .. import backend as K
  File "/home/uday/anaconda2/lib/python2.7/site-packages/keras/backend/__init__.py", line 83, in <module>
    from .tensorflow_backend import *
  File "/home/uday/anaconda2/lib/python2.7/site-packages/keras/backend/tensorflow_backend.py", line 1, in <module>
    import tensorflow as tf
  File "/home/uday/anaconda2/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import *
  File "/home/uday/anaconda2/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/uday/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/uday/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/uday/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/uday/anaconda2/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
    _mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcusolver.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.

Process finished with exit code 1

有趣的是,我只是复制了我的代码并在Jupyter笔记本中运行它完全没有问题。 在我做更新之前,它在Pycharm上运行正常。

有关大便在哪里的猜测? 在Pycharm中运行我的代码确实可以帮助我更好地调试和监视变量。

如果有解决方案,请告诉我。

有关NVIDIA驱动程序的详细信息如下:

 +-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.82                 Driver Version: 375.82                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce GTX 1070    Off  | 0000:01:00.0      On |                  N/A |
| N/A   40C    P8     9W /  N/A |   7804MiB /  8111MiB |      0%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1041    G   /usr/lib/xorg/Xorg                             302MiB |
|    0      1877    G   compiz                                          75MiB |
|    0      2439    G   ...el-token=BC244B456C2D05AA7EB480AB13C3BABB    89MiB |
|    0      5368    C   /home/uday/anaconda2/bin/python               7333MiB |
+-----------------------------------------------------------------------------+e

nvcc --version给了我以下内容:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61

正确设置所有路径。 echo $ LD_LIBRARY_PATH

/usr/local/cuda-8.0/lib64

echo $ CUDA_HOME

 /usr/local/cuda-8.0

我不确定我是否应该/usr/local/cuda-8.0/bin作为我的路径

0 个答案:

没有答案