尝试安装Tensorflow时找不到'cudart64_100.dll'

时间:2019-08-16 08:10:21

标签: tensorflow

我正在尝试安装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

我想念什么或做错什么了?

1 个答案:

答案 0 :(得分:0)

要解决此问题,请执行以下任一操作: :从2018年9月开始安装CUDA,该计算机随附cudart64_100.dll和其他32 bit *100.dlls和{{1} }。

或者,如果您希望将来获得支持:

  • 安装最新的64 bit *100 libraries
  • 但是,由于CUDA库的最新版本是NVIDIA GPU Computing Toolkit,而TensorFlow 2.0需要较旧的cudart64_101.dll,因此还要从2018年9月开始安装CUDA。
  • 然后将cudart64_100.dll库从旧版本的CUDA复制到新版本。
  • 或者只是从下面进一步提供的文件中下载库,然后将其复制到程序文件中的最后一个CUDA安装目录中。

有关更多详细信息,请参阅here