1

I am trying to run tensorflow with gpu support on my computer (NVIDIA 960 M) using anaconda and cuda but I keep running into this error. I have tried reinstalling cuda (normally and anaconda) multiple times.

>Python 2.7.15 |Anaconda, Inc.| (default, May  1 2018, 23:32:55) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
    from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
  File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
    from tensorflow.python import pywrap_tensorflow
  File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
    raise ImportError(msg)
ImportError: Traceback (most recent call last):
  File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
    from tensorflow.python.pywrap_tensorflow_internal import *
  File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
    _pywrap_tensorflow_internal = swig_import_helper()
  File "/home/aubin/anaconda2/envs/tensorflow/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: libcublas.so.9.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.
>>>> 

1 Answers1

0

The version of Tensorflow you have installed requires CUDA 9.0 (c.f. libcublas.so.9.0 import attempt). You should check if you have it installed and properly setup.

This thread has several solutions to common CUDA- or cuDNN-related problems.

benjaminplanche
  • 14,689
  • 5
  • 57
  • 69