ubuntu GNOME:tensorflowgpu安装

2024-10-03 21:30:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试在我的ubuntu GNOME机器上安装tensorflow gpu。你知道吗

我想我已经正确安装了cuda8.0和cudnnv5.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

那是cudnnv6.x文件吗?我需要安装cudnn6.x而不是5.1吗?我对Linux完全陌生,遇到了一些麻烦。请帮忙。你知道吗


Tags: inpyimporthomelibtensorflowlineload