简体   繁体   English

TensorFlow GPU 1.10不适用于CUDA 9.0

[英]TensorFlow GPU 1.10 not working with CUDA 9.0

As in title - I have installed TensorFlow GPU 1.10 and CUDA 9.0 - and they are not working. 如标题所示-我已经安装了TensorFlow GPU 1.10和CUDA 9.0-并且它们无法正常工作。 Traceback from Pycharm 2018.2: 从Pycharm 2018.2追溯:

Traceback (most recent call last):

File "C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\tensorflow\\python\\platform\\self_check.py", line 87, in preload_check ctypes.WinDLL(build_info.cudnn_dll_name) File "C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python36\\lib\\ctypes__init__.py", line 348, in init self._handle = _dlopen(self._name, mode) OSError: [WinError 126] Nie można odnaleźć określonego modułu 在preload_check ctypes.WinDLL(build_info.cudnn_dll_name)文件中的文件“ C:\\ Users \\ Admin \\ AppData \\ Local \\ Programs \\ Python \\ Python36 \\ lib \\ site-packages \\ tensorflow \\ python \\ platform \\ self_check.py”,第87行init self中的第348行“ C:\\ Users \\ Admin \\ AppData \\ Local \\ Programs \\ Python \\ Python36 \\ lib \\ ctypes__init __。py”。_handle = _dlopen(self._name,mode)OSError:[WinError 126] Niemożna odnaleźćokreślonegomodułu

During handling of the above exception, another exception occurred: 在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last): File "C:/Users/Admin/Documents/PycharmProjects/DL_Tensor_Flow_Beggining/TF_Neural_Network.py", line 2, in import tensorflow as tf File "C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\tensorflow__init__.py", line 22, in from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import File "C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\tensorflow\\python__init__.py", line 49, in from tensorflow.python import pywrap_tensorflow File "C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python36\\lib\\site-packages\\tensorflow\\python\\pywrap_tensorflow.py", line 30, in self_check.preload_check() File "C:\\Users\\Admin\\AppData\\Local\\Programs\\Python\\Python36\\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'. 追溯(最近一次通话):文件“ C:/Users/Admin/Documents/PycharmProjects/DL_Tensor_Flow_Beggining/TF_Neural_Network.py”,第2行,在导入tensorflow中作为tf文件“ C:\\ Users \\ Admin \\ AppData \\ Local \\ Programs从tensorflow.python中导入\\ Python \\ Python36 \\ lib \\ site-packages \\ tensorflow__init __。py“,第22行,pywrap_tensorflow#pylint:disable =未使用的导入文件” C:\\ Users \\ Admin \\ AppData \\ Local \\ Programs \\ Python来自tensorflow.python的\\ Python36 \\ lib \\ site-packages \\ tensorflow \\ python__init __。py“行49导入pywrap_tensorflow文件” C:\\ Users \\ Admin \\ AppData \\ Local \\ Programs \\ Python \\ Python36 \\ lib \\ site-packages self_check.preload_check()文件第30行的\\ tensorflow \\ python \\ pywrap_tensorflow.py“文件“ C:\\ Users \\ Admin \\ AppData \\ Local \\ Programs \\ Python \\ Python \\ Python36 \\ lib \\ site-packages \\ tensorflow \\ python \\ platform \\ self_check.py“,行97,在preload_check%中(build_info.cudnn_dll_name,build_info.cudnn_version_number))ImportError:找不到'cudnn64_7.dll'。 TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. TensorFlow要求将此DLL安装在%PATH%环境变量中命名的目录中。 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. 请注意,安装cuDNN是与安装CUDA分开的单独步骤,并且通常在与CUDA DLL不同的目录中找到此DLL。 You may install the necessary DLL by downloading cuDNN 7 from this URL: https://developer.nvidia.com/cudnn 您可以通过从以下URL下载cuDNN 7来安装必要的DLL: https : //developer.nvidia.com/cudnn

Process finished with exit code 1 流程以退出代码1完成

I checked CUDA 9 files and there is no 'cudnn64_7.dll' file. 我检查了CUDA 9文件,没有“ cudnn64_7.dll”文件。 Only cud....dll files there are are: cudart32_90 and cudart64_90 只有cud .... dll文件有:cudart32_90和cudart64_90

What should I do? 我该怎么办?

<<>> I have downloaded CUDnn 9.0 and I've added it as a environmental variable - still same error. << >>我已下载CUDnn 9.0,并将其添加为环境变量-仍然是相同的错误。

Specification of laptop: Win10, 8GB DDR4, Nvidia GTX 1050, i7 7700HQ 笔记本电脑规格:Win10、8GB DDR4,Nvidia GTX 1050,i7 7700HQ

You should also have cudnn on your computer as the error code says. 如错误代码所示,您还应该在计算机上安装cudnn。 Please see: https://developer.nvidia.com/cudnn 请参阅: https//developer.nvidia.com/cudnn

SOLUTION FOR THE SECOND ERROR: 第二个错误的解决方案:

We've just been able to reproduce the same error, and it was caused by a missing MSVCP140.dll. 我们刚刚能够重现同样的错误,并且该错误是由缺少MSVCP140.dll引起的。 (Thanks @wolffg!) Installing the Microsoft Visual C++ 2015 Redistributable Update 3 (x64 version) should fix it. (感谢@wolffg!)安装Microsoft Visual C ++ 2015可再发行更新3(x64版本)应该可以解决此问题。 Can you please try that and let us know if it works? 您可以尝试一下,让我们知道是否可行吗?

Answer from: github 答案来自: github

So to conclude - for other people with this problem - if you're getting error from question - check both @Dawid_Sielski, my first and my second answer (this one) to get rid of this problem. 因此,可以得出结论-对于其他有此问题的人-如果您从问题中得到错误-请同时检查@Dawid_Sielski(我的第一个和第二个答案)(此一个)以摆脱此问题。

Thanks to you all! 谢谢大家!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM