ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

1,065 views
Skip to first unread message

Rachel Ilan Ehrenfeld

unread,
Jun 3, 2018, 9:58:45 AM6/3/18
to Keras-users
Hi,
I'm new to Keras and new to Ubuntu. I follow the instructions on the end of the book "Deep learning with Python" by Francois Chollet to install on my computer the Keras with all the other things. I arrive to the final step - testing my installation by typing in: python examples/mnist_cnn.py and get the following error:
~/keras$ python examples/mnist_cnn.py
Using TensorFlow backend.
Traceback (most recent call last):
 File "examples/mnist_cnn.py", line 9, in <module>
   import keras
 File "build/bdist.linux-x86_64/egg/keras/__init__.py", line 3, in <module>
 File "build/bdist.linux-x86_64/egg/keras/utils/__init__.py", line 6, in <module>
 File "build/bdist.linux-x86_64/egg/keras/utils/conv_utils.py", line 9, in <module>
 File "build/bdist.linux-x86_64/egg/keras/backend/__init__.py", line 87, in <module>
 File "build/bdist.linux-x86_64/egg/keras/backend/tensorflow_backend.py", line 5, in <module>
 File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 24, in <module>
   from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import
 File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 49, in <module>
   from tensorflow.python import pywrap_tensorflow
 File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
   raise ImportError(msg)
ImportError: Traceback (most recent call last):
 File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
   from tensorflow.python.pywrap_tensorflow_internal import *
 File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
   _pywrap_tensorflow_internal = swig_import_helper()
 File "/usr/local/lib/python2.7/dist-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.


for some common reasons and solutions.  Include the entire stack trace
above this error message when asking for help.

Dennis S

unread,
Jun 3, 2018, 10:14:31 AM6/3/18
to Rachel Ilan Ehrenfeld, Keras-users
I'm not familiar with this particular tutorial, but was there a step to install Tensorflow and make sure that was installed prior to running the code you posted?

--
You received this message because you are subscribed to the Google Groups "Keras-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keras-users+unsubscribe@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/keras-users/1468229c-f87f-432d-8bcf-80e1d393524e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Thanks,

Dennis

Matias Valdenegro

unread,
Jun 3, 2018, 10:35:22 AM6/3/18
to keras...@googlegroups.com

More importantly, assuming one wants to use a GPU, then you need to install tensorflow-gpu and CUDA 9.0, and you have to make sure that paths to CUDA are set correctly.

 

You also have to install exactly CUDA 9.0 as currently the tensorflow binaries are linked to that version, not 9.1 or 9.1.

> > To view this discussion on the web, visit https://groups.google.com/d/

> > msgid/keras-users/1468229c-f87f-432d-8bcf-80e1d393524e%40googlegroups.com

Reply all
Reply to author
Forward
0 new messages