2

It confused me much time when I import tensorflow on my system in python: It shows below:

import tensorflow Traceback (most recent call last): File "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/home/hanwen/anaconda3/envs/tensorflow-gpu/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 "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/home/hanwen/anaconda3/envs/tensorflow-gpu/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 "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/init.py", line 24, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/python/init.py", line 49, in from tensorflow.python import pywrap_tensorflow File "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in raise ImportError(msg) ImportError: Traceback (most recent call last): File "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in from tensorflow.python.pywrap_tensorflow_internal import * File "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in _pywrap_tensorflow_internal = swig_import_helper() File "/home/hanwen/anaconda3/envs/tensorflow-gpu/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 "/home/hanwen/anaconda3/envs/tensorflow-gpu/lib/python3.6/imp.py", line 243, in load_module return load_dynamic(name, filename, file) File "/home/hanwen/anaconda3/envs/tensorflow-gpu/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/install_sources#common_installation_problems

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

  • 3
    because the tensorflow binary you are trying to run expects CUDA 9.0. CUDA 8.0 will not work with that, nor will CUDA 9.1 or 9.2: `ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory` It requires CUDA 9.0 – Robert Crovella Sep 08 '18 at 03:07
  • I have uninstalled CUDA 8.0 and installed Cuda9.0 as well as it's compatible cudnn. It also shows the same problem. – Hanwen Liang Sep 14 '18 at 20:52

0 Answers0