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

时间:2022-09-01 05:56:28

ubuntu16.04安装cuda8.0,tensorflow-gpu版本后,运行时报错:

ImportError: libcudnn.so.5: cannot open shared object file: No such file or directory
Failed to load the native TensorFlow runtime.

————————————————————————————————————

原因:tensorflow与cuda版本不匹配,试了一下

tensorflow-gpu==1.1.0对应需要cudnn5.0

tensorflow-gpu==1.4.0对应需要cudnn6.0

tensorflow-gpu==1.7.0,1.6.0,1.5.0对应需要cudnn9.0

tensorflow-gpu==对应需要cudnn9.0

安装cuda8.0需要对应安装tensorflow-gpu==1.4.1

cudnn下载地址https://developer.nvidia.com/rdp/cudnn-archive

下载cudnn5.0按照以下方法安装,6.0改成5.0

https://blog.csdn.net/Teeyohuang/article/details/79660547?utm_source=blogxgwz6