我有在python3進口tensorflow問題:Tensorflow:導入錯誤:libcusolver.so.8.0:無法打開共享對象文件:沒有這樣的文件或目錄
>>> import tensorflow as tf
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
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: libcusolver.so.8.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 "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/dist-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/__init__.py", line 51, in <module>
from tensorflow.python import pywrap_tensorflow
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
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: libcusolver.so.8.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.
我使用的Nvidia驅動程序版本381.09 Beta版作爲版本375有這個錯誤:https://askubuntu.com/questions/896221/strange-artifacts-along-window-borders-after-waking-computer-from-sleep-mode?noredirect=1&lq=1
我有安裝CUDA 8.0和cuDNN-V6.0:
[email protected]:~$ cd /usr/local
[email protected]:/usr/local$ ls
bin cuda etc include man share
computecpp cuda-8.0 games lib sbin src
此外,libcusolver.so.8.0在/ usr /本地/ CUDA/lib64的存在/ :
libcusolver.so.8.0 in 'ls' output
我已經卸載並重新安裝CUDA,cuDNN,並從源代碼構建的tensorflow。自從將Nvidia驅動程序更新至版本381.09測試版以來,這個問題一直存在。任何幫助?
如果你現在有** CUDA 9.0 **,那麼使用'tf-nightly-gpu',直到它穩定。 – OverCoder
@OverCoder我目前正在使用從CUDA 9.0的源代碼構建的1.4.0-rc0,現在我一直沒有問題。我是否仍然應該切換到'tf-nightly-gpu'? –
我錯了,我誤讀了[this](https://github.com/tensorflow/tensorflow/issues/12052#issuecomment-335262465),你需要從源代碼開始構建。 – OverCoder