ubuntu GNOME:tensorflow-gpu安装错误

时间:2018-01-07 08:12:50

标签: python tensorflow ubuntu-16.04 cudnn

我正在尝试在我的ubuntu GNOME计算机上安装tensorflow-gpu。

我认为我正确安装了CUDA 8.0和cudnn v5.1,但是当我打开tensorflow环境并运行时

>>>import tensorflow as tf

我收到以下错误消息:

(tensorflow) imhgchoi@froilan:~$ python
Python 3.5.4 |Anaconda, Inc.| (default, Nov 20 2017, 18:44:38) 
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

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


Failed to load the native TensorFlow runtime.

长话短说,我得到两个

ImportError : libcudnn.so.6: cannot open shared object file: No such file or directory

这是一个cudnn v6.x文件吗?我是否需要安装cudnn 6.x而不是5.1?我是Linux新手,遇到麻烦。请帮忙。

0 个答案:

没有答案