the-full-stack / fsdl-text-recognizer-project

Lab materials for the Full Stack Deep Learning Course
https://fullstackdeeplearning.com/course
1.21k stars 429 forks source link

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

Closed gitfourteen closed 5 years ago

gitfourteen commented 5 years ago

### In colab, virtual environment failed to import tensroflow.

Run command as following:

  1. !pwd /content/gdrive/My Drive/fsdl-text-recognizer-project/lab2_sln

  2. !nvcc --version(for now I have no idea what this info will help debug, just list here FYI)

nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2018 NVIDIA Corporation Built on Sat_Aug_25_21:08:01_CDT_2018 Cuda compilation tools, release 10.0, V10.0.130

  1. !pipenv run python (failed to import tensorflow!) Python 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux Type "help", "copyright", "credits" or "license" for more information.

    import tensorflow as tf

Traceback (most recent call last): File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/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 "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/imp.py", line 343, in load_dynamic return _load(spec) ImportError: libcublas.so.9.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 "", line 1, in File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/site-packages/tensorflow/init.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/site-packages/tensorflow/python/init.py", line 49, in from tensorflow.python import pywrap_tensorflow File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/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 "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/root/.local/share/virtualenvs/fsdl-text-recognizer-project-iJwlu5A8/lib/python3.6/imp.py", line 343, in load_dynamic return _load(spec) 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/errors

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

KeyboardInterrupt

KeyboardInterrupt

KeyboardInterrupt ^C

  1. !python (this is OK) Python 3.6.8 (default, Jan 14 2019, 11:02:34) [GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux Type "help", "copyright", "credits" or "license" for more information.

    import tensorflow as tf tf.__version__ '1.14.0'

    KeyboardInterrupt

    KeyboardInterrupt

    KeyboardInterrupt ^C

gitfourteen commented 5 years ago

After updating tensorflow to version 1.14.0 in virtual environment, this issue is addressed.

!pipenv update --outdated

!pipenv update tensorflow