ImportError: libcudnn.so.6: nicht öffnen können shared object-Datei: Keine solche Datei oder Verzeichnis
Bekomme ich folgenden Fehler beim importieren von Tensorflow.
>>> import tensorflow
Traceback (most recent call last):
File "/home/jarvis/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/jarvis/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/jarvis/anaconda3/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/jarvis/anaconda3/lib/python3.6/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/jarvis/anaconda3/lib/python3.6/imp.py", line 342, 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/jarvis/anaconda3/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/jarvis/anaconda3/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/jarvis/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/jarvis/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/jarvis/anaconda3/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/jarvis/anaconda3/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/jarvis/anaconda3/lib/python3.6/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/jarvis/anaconda3/lib/python3.6/imp.py", line 342, 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.
Habe ich noch die path-Variablen zu
$ 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}}
Dann das system erkennt nvcc.
Aber sobald schließen Sie das terminal-Fenster, und geben Sie nvcc -V in ein neues terminal, es zeigt wieder nicht installiert
Du musst angemeldet sein, um einen Kommentar abzugeben.
Zu installieren, müssen Sie cuDNN v6.0 Bibliothek.
Entnehmen Sie bitte den folgenden link.
Nach dem Bau TensorFlow von der Quelle, sehen libcudart.so und libcudnn Fehler
Eine Sache, die für mich gearbeitet wurde, die, anstatt mit 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64": "früher habe ich 'export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:~/cuda/lib64" ' und es funktionierte. Ich habe es zu tun, jedesmal, wenn der computer gestartet wird. Weiß nicht, was cuda zu tun in meinem home-Ordner und weiß nicht, warum ich brauchen, um es zu tun jedes mal.
tatsächlich, ich traf dieses problem bei der Installation tensorflow-gpu nach der offiziellen Installation Dokument. Ich löste es, indem Sie die version von tensorflow-gpu.
Änderte ich die Anzahl auf 1.2.0 1.3.0 ,es funktioniert.die neue installieren commend unter: