davisking/dlib

DLL load failed for CUDA on Python 3.8 for Windows

開放

#2,039 建立於 2020年3月28日

 (27 則留言) (2 個反應) (0 位負責人)C++ (3,442 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (14,434 顆星)
PR 合併指標
 (平均合併 3小時 56分鐘) (30 天內合併 2 個 PR)

描述

Expected Behavior

>>> import dlib
>>> :)

Current Behavior

>>> import dlib
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: DLL load failed while importing dlib: The specified module could not be found.
>>> :(

Steps to Reproduce

  1. Install CUDA
  2. Install cuDNN
  3. git clone https://github.com/davisking/dlib.git
  4. python setup.py install
  5. python -c"import dlib"

Because of A change in Python 3.8 for Windows, Python no longer searches for DLLs in directories listed in the PATH environment variable and fails to find curand64_10.dll, this is fixed after running os.add_dll_directory(os.path.join(os.environ['CUDA_PATH'], 'bin'))

  • Version: 19.19.99
  • Where did you get dlib: this github repo
  • Platform: Python 3.8 64-bit for Windows 10

貢獻者指南