我使用Ubuntu 16.04,Cuda 8.0和cudann-v5.1。我卸載了Tensorflow-CPU版本並重新啓用了tensorflow-GPU。其次這裏給出的說明:https://alliseesolutions.wordpress.com/2016/09/08/install-gpu-tensorflow-from-sources-w-ubuntu-16-04-and-cuda-8-0-rc/ImportError:libnvidia-fatbinaryloader.so.375.39:無法打開共享目標文件:沒有這樣的文件或目錄
但是,當我嘗試加載tensorflow,我得到以下錯誤:
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/__init__.py", line 51, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 56, 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 41, 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: libnvidia-fatbinaryloader.so.375.39: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.
同樣的問題在這裏。到目前爲止,我通過在我的'LD_LIBRARY_PATH'環境變量中添加'/ usr/lib/nvidia-375'來傳遞錯誤信息。這可能不是問題的結局,雖然我沒有解決,但我正在與另一個爭鬥。 –