gpt4 book ai didi

python-3.x - ImportError : libcublas. so.9.0:无法打开共享对象文件:没有这样的文件或目录(Windows)

转载 作者:行者123 更新时间:2023-12-03 00:36:41 25 4
gpt4 key购买 nike

我正在尝试安装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

在处理上述异常的过程中,又发生了一个异常:

回溯(最近一次调用最后一次):

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

无法加载 native TensorFlow 运行时。

最佳答案

将你的cuda路径放入环境变量中。

LD_LIBRARY_PATH = /usr/local/cuda/lib64:$LD_LIBRARY_PATH

将此行放入您的 bash 配置文件中,并使用 source .bash_profile 更新它。打开新终端并再次运行。如果您遇到同样的错误,请查看此 solution .

还可能发生另外一件事。您可能会遇到旧安装的问题。确保您已删除所有旧版本的tensorflow和cuda。 (我的意思是你电脑上的旧安装)。在干净的空间上安装您想要的版本。如果它不起作用,请看看这个 solution

关于python-3.x - ImportError : libcublas. so.9.0:无法打开共享对象文件:没有这样的文件或目录(Windows),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48605958/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com