gpt4 book ai didi

linux - 在 MX150 上安装 tensorflow-gpu 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 12:00:29 25 4
gpt4 key购买 nike

我正在尝试在运行 MX150 的笔记本电脑上安装 tensorflow gpu。我更新了我的 NVIDIA 驱动程序,安装了 CUDA ,安装了 CUDnn。但仍然无法导入 Tensorflow。出现以下错误

>>> import tensorflow as tf
Traceback (most recent call last):
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.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 "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 72, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
File "/home/rohan/anaconda3/envs/tensorflow_env/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
ImportError: libcublas.so.8.0: cannot open shared object file: No such file or directory

最佳答案

您的 python 版本和 CUDA 版本之间似乎不匹配。请通过以下方式检查您的版本:

python --version

nvcc --version

你的操作系统是什么?您尝试运行哪个版本的 Tensorflow?我建议卸载 tensorflow 并在你拥有正确版本的 Python 和 CUDA 后重新安装它。可以关注Tesnoeflow with gpu documentation .

同时检查这个与你的问题类似的问题 libcublas.so.8.0 error with tensorflow

关于linux - 在 MX150 上安装 tensorflow-gpu 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52604040/

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