ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory (Windows)
我正在尝试安装tensorflow的对象检测模块,但在运行以下命令时:
python3 object_detection/builders/model_builder_test.py
我收到以下错误。 我安装了CUDA 8.0,9.0,9.1和cuDNN 6和7,但仍然有以下错误。 感谢您的建议,谢谢!
Traceback (most recent call last):
File"/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File"/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_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: libcublas.so.9.0: cannot open shared object file: No such file or directory
在处理上述异常期间,发生了另一个异常:
Traceback(最近一次调用最后一次):
File"object_detection/builders/model_builder_test.py", line 18, in
import tensorflow as tf
File"/usr/local/lib/python3.5/dist-packages/tensorflow/init.py", line 24, in
from tensorflow.python import *
File"/usr/local/lib/python3.5/dist-packages/tensorflow/python/init.py", line 49, in
from tensorflow.python import pywrap_tensorflow
File"/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File"/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in
from tensorflow.python.pywrap_tensorflow_internal import *
File"/usr/local/lib/python3.5/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in
_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: libcublas.so.9.0: cannot open shared object file: No such file or directory
无法加载本机TensorFlow运行时。
将您的cuda路径放入环境变量中。
1 | LD_LIBRARY_PATH = /usr/local/cuda/lib64:$LD_LIBRARY_PATH |
将此行放入您的bash配置文件并使用源.bash_profile更新它。
打开新终端并再次运行。 如果你得到同样的错误,请看看这个解决方案。
还有一件事也可能发生。 您可能遇到旧安装问题。 确保你删除了所有旧版本的tensorflow和cuda。 (我的意思是你的电脑安装旧)。 在干净的空间中安装所需的版本。 如果它不能正常工作,请看一下这个解决方案