davisking / davisking/dlib

DLL load failed for CUDA on Python 3.8 for Windows

Open
#2,039 27 comments 2 reactions 0 assignees View on GitHub
bug help wanted
Dominant language
C++
Stars
14.4k
Forks
3.4k
PR merge metrics
No merged PRs in 30d

Description

## Expected Behavior

>>> import dlib
>>> :)

## Current Behavior
>>> import dlib
Traceback (most recent call last):
File "", line 1, in
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](https://docs.python.org/3.8/whatsnew/3.8.html#bpo-36085-whatsnew), 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.