gpt4 book ai didi

python - Anaconda Tensorflow 运行时问题

转载 作者:太空宇宙 更新时间:2023-11-03 17:06:56 25 4
gpt4 key购买 nike

我正在尝试使用 anaconda 和 cuda 在我的计算机 (NVIDIA 960 M) 上运行支持 gpu 的 tensorflow,但我一直遇到此错误。我曾多次尝试重新安装 cuda(通常是 anaconda)。

>Python 2.7.15 |Anaconda, Inc.| (default, May  1 2018, 23:32:55) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 74, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 58, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/aubin/anaconda2/envs/tensorflow/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcublas.so.9.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.
>>>>

最佳答案

您安装的 Tensorflow 版本需要 CUDA 9.0(参见 libcublas.so.9.0 import attempt)。您应该检查是否已安装并正确设置。

thread对常见的 CUDA 或 cuDNN 相关问题有多种解决方案。

关于python - Anaconda Tensorflow 运行时问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50518622/

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