我尝试按照链接安装张量流中给出的安装张量流
我将它安装在虚拟环境中。我收到了编辑最后给出的导入错误。
我设置了以下环境变量。
PATH=/usr/local/cuda-8.0/bin:rest/of/the/path
LD_LIBARY_PATH=/home/harshit/Drivers/cudnn5.0/cuda/:/usr/local/cuda-8.0/lib64/:/usr/local/cuda/lib64/
此外,我还尝试手动复制 cudnn 的文件,但仍然没有运气。也就是说,我在两者中都有 libcudnn.so.5/usr/local/cuda/lib64
和/usr/local/cuda-8.0/lib64
.
正如其他相关帖子中所给出的,问题通常是由环境路径引起的,但我觉得它们在我的情况下是非常正确的,但仍然存在错误。
请帮忙!
编辑-这是完整的错误回溯-
(env) harshit@echo:~$ python
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow
Traceback (most recent call last):
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/harshit/Documents/projects/tensorflowplay/env/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/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.5: 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/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/site-packages/tensorflow/__init__.py", line 24, in <module>
from tensorflow.python import *
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/site-packages/tensorflow/python/__init__.py", line 51, in <module>
from tensorflow.python import pywrap_tensorflow
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>
raise ImportError(msg)
ImportError: Traceback (most recent call last):
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/home/harshit/Documents/projects/tensorflowplay/env/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/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/imp.py", line 242, in load_module
return load_dynamic(name, filename, file)
File "/home/harshit/Documents/projects/tensorflowplay/env/lib/python3.5/imp.py", line 342, in load_dynamic
return _load(spec)
ImportError: libcudnn.so.5: 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.