我正在尝试安装tensorflow。
我已经安装了Cuda10.0和cudnn,但是仍然出现此错误:
Traceback (most recent call last):
File "D:\python\lib\site-packages\tensorflow\python\platform\self_check.py", line 75, in preload_check
ctypes.WinDLL(build_info.cudart_dll_name)
File "D:\python\lib\ctypes\__init__.py", line 364, in __init__
self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] 找不到指定的模块。
在处理上述异常期间,发生了另一个异常:
Traceback (most recent call last):
File "D:/Python_test/Python算法成品/机器学习/test/test.py", line 4, in <module>
import tensorflow as tf
File "D:\python\lib\site-packages\tensorflow\__init__.py", line 40, in <module>
from tensorflow.python.tools import module_util as _module_util
File "D:\python\lib\site-packages\tensorflow\python\__init__.py", line 49, in <module>
from tensorflow.python import pywrap_tensorflow
File "D:\python\lib\site-packages\tensorflow\python\pywrap_tensorflow.py", line 30, in <module>
self_check.preload_check()
File "D:\python\lib\site-packages\tensorflow\python\platform\self_check.py", line 82, in preload_check
% (build_info.cudart_dll_name, build_info.cuda_version_number))
ImportError: Could not find 'cudart64_100.dll'. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 10.0 from this URL: `enter code here`https://developer.nvidia.com/cuda-90-download-archive
我想念什么或做错什么了?
答案 0 :(得分:0)
要解决此问题,请执行以下任一操作: :从2018年9月开始安装CUDA,该计算机随附cudart64_100.dll
和其他32 bit *100.dlls
和{{1} }。
或者,如果您希望将来获得支持:
64 bit *100 libraries
。NVIDIA GPU Computing Toolkit
,而TensorFlow 2.0需要较旧的cudart64_101.dll
,因此还要从2018年9月开始安装CUDA。cudart64_100.dll
库从旧版本的CUDA复制到新版本。有关更多详细信息,请参阅here