Problem :
I am facing following error while importing the Tensorflow.
>>> import tensorflow
Traceback (most recent call last):
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 33, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 39, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/alecxe/anaconda3/lib/python3.6/imp.py", line 151, in load_module
return load_dynamic(name, filename, file)
File "/home/alecxe/anaconda3/lib/python3.6/imp.py", line 363, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: 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 "<stdin>", line 1, in <module>
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/__init__.py", line 35, in <module>
from tensorflow.python import *
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 69, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 32, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 53, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 49, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/alecxe/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 33, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/alecxe/anaconda3/lib/python3.6/imp.py", line 151, in load_module
return load_dynamic(name, filename, file)
File "/home/alecxe/anaconda3/lib/python3.6/imp.py", line 363, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.6: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
I tried to add the path variables too as below :
$ export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
$ export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
Then my system detects nvcc. But as soon as I open the terminal windows, and type nvcc -V in the new terminal window it again shows that not installed