【发布时间】:2018-02-09 03:58:53
【问题描述】:
在anaconda下创建了tensorflow环境后,我安装了tensorflow-gpu。然后我试图导入 tensorflow 来验证它是否安装正确,但是得到了这个错误:
ImportError: Could not find 'cudnn64_7.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Note that installing cuDNN is a separate step from installing CUDA, and this DLL is often found in a different directory from the CUDA DLLs. You may install the necessary DLL by downloading cuDNN 7 from this URL: https://developer.nvidia.com/cudnn
设置是:
NVIDIA GTX 1080
CUDA 9.0
cuDNN 6.0
tensorflow-gpu 1.5
环境变量是:
CUDA_PAT: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
CUDA_PATH_V9_0: C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0
%Path% 变量是:
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\bin
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\lib\x64
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.0\libnvvp
C:\Users\yshen\AppData\Local\cudnn-8.0-windows10-x64-v6.0\cuda\bin
很明显我安装了cuDNN6.0,为什么错误显示“找不到'cudnn64_7.dll'”。为什么它会自动搜索 cudnn64_7.dll 而不是 cudnn64_6.dll?
【问题讨论】:
-
@janeshen 请阅读此主题以解决问题github.com/tensorflow/tensorflow/issues/13442
-
Here's an answer with all the steps 用于更高版本的 Tensorflow(需要更新的 CUDA)。
标签: python tensorflow