Python Tensorflow导入错误:libcudnn.so.5没有这样的文件或目录
我试图在google colab中使用Python Tensorflow导入错误:libcudnn.so.5没有这样的文件或目录,python,tensorflow,jupyter-notebook,google-colaboratory,Python,Tensorflow,Jupyter Notebook,Google Colaboratory,我试图在google colab中使用tensorflow gpu==1.2.0。 我确实安装了软件包cuda-8.0,并将libcudnn.so.5下载并移动到/usr/local/cuda/lib64中,但仍然出现以下错误: ImportError: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py",
tensorflow gpu==1.2.0
。
我确实安装了软件包cuda-8.0,并将libcudnn.so.5下载并移动到/usr/local/cuda/lib64中,但仍然出现以下错误:
ImportError: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>
from tensorflow.python.pywrap_tensorflow_internal import *
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 29, in <module>
_pywrap_tensorflow_internal = swig_import_helper()
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 25, in swig_import_helper
_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)
ImportError: libcudnn.so.5: cannot open shared object file: No such file or directory
ImportError:回溯(最近一次调用):
文件“/usr/local/lib/python2.7/dist packages/tensorflow/python/pywrap_tensorflow.py”,第41行,在
从tensorflow.python.pywrap\u tensorflow\u内部导入*
文件“/usr/local/lib/python2.7/dist packages/tensorflow/python/pywrap\u tensorflow\u internal.py”,第29行,在
_pywrap\u tensorflow\u internal=swig\u import\u helper()
swig\u import\u helper中的文件“/usr/local/lib/python2.7/dist packages/tensorflow/python/pywrap\u tensorflow\u internal.py”,第25行
_mod=imp.load_模块(“pywrap_tensorflow_internal”,fp,路径名,描述)
ImportError:libcudnn.so.5:无法打开共享对象文件:没有此类文件或目录
我试图遵循下一个解决方案:
但这对我不起作用。
我很乐意获得帮助。如果找不到该文件,则该文件不在链接器正在查找的位置 从: 链接器使用以下搜索路径查找所需的共享库:
非常感谢。根据您的回答,我确实将libcudnn5文件添加到了/lib,并在/lib目录中创建了到libcudnn.so.5的软链接,它确实解决了问题。