libcublas问题 - tensorflow

时间:2017-06-12 09:46:37

标签: python-2.7 tensorflow

我对tensorflow很新,在安装上苦苦挣扎。我使用的是ubuntu 16.04。我显然安装了Nvidia依赖项。 每当我输入:

import tensorflow as tf

我明白了:

File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 699, in runfile
execfile(filename, namespace)
File "/usr/lib/python2.7/dist-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 81, in execfile
builtins.execfile(filename, *where)
File "/media/as/KINGSTON/SIEC NEURONOWA/NETWORK.py", line 3, in <module>
from keras.models import Sequential

File "/usr/local/lib/python2.7/dist-packages/keras/__init__.py", line 3, in <module>
from . import activations

File "/usr/local/lib/python2.7/dist-packages/keras/activations.py", line 4, in <module>
from . import backend as K

File "/usr/local/lib/python2.7/dist-packages/keras/backend/__init__.py", line 73, in <module>
from .tensorflow_backend import *

File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 1, in <module>
import tensorflow as tf

File "/home/as/.local/lib/python2.7/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *

File "/home/as/.local/lib/python2.7/site-packages/tensorflow/python/__init__.py", line 51, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/as/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)

ImportError: Traceback (most recent call last):
File "/home/as/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/as/.local/lib/python2.7/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/as/.local/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.8.0: cannot open shared object file: No such file or directory


Failed to load the native TensorFlow runtime.

请参阅https://www.tensorflow.org/install/install_sources#common_installation_problems

出于一些常见原因和解决方案。包括整个堆栈跟踪 请求帮助时出现此错误消息。

我尝试了很多解决方案,但效果仍然相同。非常感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

在R中安装gputools时遇到同样的问题。经过数百次尝试,对我有用的命令是:

sudo ln -s /usr/local/cuda/lib64/libcublas.so.8.0 /usr/lib/libcublas.so.8.0

OR

sudo ln -s /usr/local/cuda-8.0/lib64/libcublas.so.8.0 /usr/lib/libcublas.so.8.0