我試圖安裝tensorflow,現在我堅持了以下警告:當我導入TensorFlow時,爲什麼會出現ImportError?
[email protected]:~$ python3 -c 'import tensorflow as tf; print(tf.__version__)' # for Python 3Traceback (most recent call last):
...
File "/usr/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libnvidia-fatbinaryloader.so.375.39: 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 "<string>", line 1, in <module>
...
File "/usr/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libnvidia-fatbinaryloader.so.375.39: 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.
誰能告訴我怎樣才能解決呢?
您是否安裝了GPU版本?您是否安裝了所需的CUDA依賴關係? – kaufmanu
@ kaufmanu是的,我安裝了GPU版本,但沒有說安裝圖形驅動程序。我這樣做是因爲安裝失敗。 – user3419211
您能否在您的文章中添加更多信息您是如何準確安裝張量流和哪個版本的(例如,如果您使用夜間構建,如果您是從源代碼構建它,還是使用pip等)?另外,您是否安裝了cuDNN和CUDA工具包? – kaufmanu