ImportError: libcusolver.so.8.0: Unable to open shared objects file: No such file or directory

Possible duplicate of this question. I have a gpu account with which I connect via putty (ssh login). I created a virtualenv there and I am installing tensorflow via pip for gpu. Everything works fine when I run the command

$ pip list

      

the following list is displayed:

 backports.weakref (1.0rc1)
 bleach (1.5.0)
 funcsigs (1.0.2)
 html5lib (0.9999999)
 Markdown (2.6.8)
 mock (2.0.0)
 numpy (1.13.1)
 olefile (0.44)
 pbr (3.1.1)
 Pillow (4.2.1)
 pip (9.0.1)
 protobuf (3.3.0)
 setuptools (36.0.1)
 six (1.10.0)
 tensorflow-gpu (1.2.1)
 Werkzeug (0.12.2)
 wheel (0.29.0)

      

But when I run:

$ python
>>> import tensorflow

      

The following error is displayed:

  Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/nauman/junaid/final/test/lib/python2.7/site-
  packages/tensorflow/__init__.py", line 24, in <module>
  from tensorflow.python import *
  File "/home/nauman/junaid/final/test/lib/python2.7/site-
  packages/tensorflow/python/__init__.py", line 49, in <module>
  from tensorflow.python import pywrap_tensorflow
  File "/home/nauman/junaid/final/test/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/nauman/junaid/final/test/lib/python2.7/site-
  packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
  from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/nauman/junaid/final/test/lib/python2.7/site-
  packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in 
  <module>
  _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/nauman/junaid/final/test/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.

      

I also set the environment variables like this:

  export CUDA_HOME=/opt/cuda
  export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$CUDA_HOME/lib64:$CUDA_HOME/extras/CUPTI/lib64"

      

Also, I found that libcusolver.so.8.0 is not there and libcusolver.so.7.5 is in cuda / lib64 /. Somehow tensorflow finds the wrong file or I don't know anything. Any help would be appreciated as I am new to all of this. Python version: 2.7 OS: Linux

+3


source to share


4 answers


I solved the problem. Actually I have cuda 7.5 installed and I have installed the latest tensorflow which probably supports cuda 8.0. So I dropped.



 pip install --upgrade \ https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.10.0-cp27-none-linux_x86_64.whl

      

+3


source


This could be due to incorrect linking of your libraries.
Just run it sudo ldconfig /usr/local/cuda/lib64

. He decided for me.



If you need to know more: ldconfig

man

page
.

+5


source


If you installed tensorflow-gpu

using the pip

pre-built .whl

, cuda version has been corrected. As far as I know, since 0.11.0rc1

all the pre-packaged packages are now built for cuda 8

. Thus, there are two ways to solve the problem:

  • install cuda 8

    for ready-made packagestensorflow-gpu >= 0.11.orc1

  • save cuda 7.5

    and then build tensorflow-gpu

    from source
0


source


If you are using cuda-9.0 try sudo apt install nvidia-cuda-dev

(if you are using Ubuntu distribution)

0


source







All Articles