ImportError:找不到“ cudnn64_7.dll”

时间:2018-08-13 14:02:40

标签: python tensorflow anaconda cudnn

我遇到以下错误:

<?xml version="1.0" encoding="UTF-8"?>
<webGroups class="com.linoma.dpa.commandcenter.codec.WebGroupVOListCodec">
<webGroup>
 <inviteUserPermission>true</inviteUserPermission> 
 <secureMailPermissions>1</secureMailPermissions>
 <webUsers>
  <webUser>
  <name>RGKrish183@gmail.com</name> // i need to update value #Gopal@gm.com
  </webUser>
 </webUsers>
 </webGroup>
</webGroups>

var xmlString = //above xml values from GlideRecord
var xmldoc = new XMLDocument(xmlString);
var node = xmldoc.getNodeText("/webGroups/webGroup/webUsers/webUser/name");
gs.print(node); // now getting RGKrish183@gmail.com

我已经在%Path%环境中提到的目录中安装了所需的“ cuDNN 7”文件,但是该语句

 Traceback (most recent call last):   File
 "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\self_check.py",
 line 87, in preload_check
     ctypes.WinDLL(build_info.cudnn_dll_name)   File "C:\Anaconda\envs\tensorflow\lib\ctypes\__init__.py", line 348, in
 __init__
     self._handle = _dlopen(self._name, mode) OSError: [WinError 126] The specified module could not be found

 During handling of the above exception, another exception occurred:

 Traceback (most recent call last):   File "<stdin    ", line 1, in
 <module       File
 "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\__init__.py",
 line 22, in <module    
     from tensorflow.python import pywrap_tensorflow  # pylint: disable=unused-import   File
 "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\__init__.py",
 line 49, in <module    
     from tensorflow.python import pywrap_tensorflow   File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\pywrap_tensorflow.py",
 line 30, in <module    
     self_check.preload_check()   File "C:\Anaconda\envs\tensorflow\lib\site-packages\tensorflow\python\platform\self_check.py",
 line 97, in preload_check
     % (build_info.cudnn_dll_name, build_info.cudnn_version_number)) 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

不起作用。我已经从上述站点下载了cuDNN 7文件:

https://developer.nvidia.com/cudnn

我已经遍历了StackOverflow上的所有答案,但仍然遇到相同的错误。 请指导我如何运行以上声明。

3 个答案:

答案 0 :(得分:1)

这就是我所做的。

步骤1)在计算机上安装“ NVIDIA GEFORCE EXPERIENCE”以检查驱动程序版本。

第2步)驱动程序版本较旧。更新可用。所以我更新了我的图形驱动程序。

我的GPU属性现在是:-

NVIDIA GEFORCE EXPERIENCE Version 3.14.1.48
GeForce 940MX
Driver Version 398.82
Intel(R) Core(TM) i5-7200U CPU @2.50GHz
7.9 GB RAM

现在,当执行语句时,通过conda环境(我创建了一个名为'tensorflow'的环境)

(tensorflow) C:\Users\Arnab Sinha>pip install --ignore-installed --upgrade tensorflow-gpu

我遇到了以下消息:-

pandas 0.23.4 requires python-dateutil>=2.5.0, which is not installed.

pandas 0.23.4 requires pytz>=2011k, which is not installed.

然后我通过依次执行以下命令来安装所需的软件包

pip install python-dateutil

pip install pytz

之后,我在Python 3.6.6中运行了命令

import tensorflow as tf

然后

print(tf.__version__)

给出了输出

1.10.0

这是我将Tensorflow 1.10.0安装到计算机中的方式。但是,Anaconda Navigator没有Tensorflow 1.10.0的更新。如果找到了更新,请通知我。

答案 1 :(得分:1)

对我来说是我没有安装cuDNN。 根据您的cuda版本下载它,并将其解压缩到cuda目录中

答案 2 :(得分:0)

您已导出PATH吗?有时,我们不会注意到这些小细节。