【问题标题】:Anaconda Tensorflow runtime issueAnaconda Tensorflow 运行时问题
【发布时间】:2018-05-24 21:45:43
【问题描述】:

我正在尝试使用 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.
>>>> 

【问题讨论】:

  • 你是第一次面对吗?

标签: python ubuntu tensorflow anaconda conda


【解决方案1】:

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

这个thread 有几种常见的 CUDA 或 cuDNN 相关问题的解决方案。

【讨论】:

    猜你喜欢
    • 2017-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多