-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DLL load failed for CUDA on Python 3.8 for Windows #2039
Comments
Urg, windows dynamic loading is such a mess :( |
I'm marking this help wanted because I'm not feeling super motivated to figure out how to fix this right now. So if someone wants to make this work I would much appreciate it. It seems like the solution is to make CMake/setup.py generate a init.py that includes the appropriate |
Let me see if I can do that in the next few days, I have everything needed to reproduce it anyway. |
I followed the same steps but I'm still getting the error of DLL load failed while importing dlib: The specified module could not be found |
Well, clearly I failed to work on this. This seems to be a much bigger change than I expected. |
@cashlo Yes I do since I'm using Tensorflow with the GPU here is my CUDA_PATHs |
I just pushed a change to how dlib is packaged that should fix this. So pull the latest dlib from github and try installing that version. |
|
What's in your |
@Mouradost That doesn't look like the contents of the CUDA_PATH variable, but PATH or something else. I say this because it would be very surprising if all those c:\windows paths were in CUDA_PATH. |
|
So whats in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin? |
I don't see cudnn's .dll file in that list. You need to install cudnn.
Which is curious, since cmake must have found a copy of cudnn somewhere on
your computer based on other things you said.
…On Sun, Jun 14, 2020 at 4:08 AM mourad lablack ***@***.***> wrote:
So whats in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin?
These are the files in C:\Program Files\NVIDIA GPU Computing
Toolkit\CUDA\v10.1\bin
[image: image]
<https://user-images.githubusercontent.com/17816194/84588343-2be56e00-ae59-11ea-9146-d744a4594f25.png>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#2039 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPYFRZH72KFTJVMOR5QMLTRWSAQXANCNFSM4LVOATAQ>
.
|
I have it under a different folder on c:\tools\cuda\bin should I add a copy to the C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin ? |
it's working awesome thank you @davisking |
Where was it? Oh you noted in your other comment. Really we should make the install process record the location of the copy it found rather than expecting the user to do something special. |
@Mouradost I just pushed a change to github that should make this work without needing to assume anything about |
Sure I will give you my feedback thank you for your consideration and your help |
I had the habit to create a separate folder in the C:\ called tools and I put my cudnn files there which make it easy to find and change only the cudnn files if I want to use different version on cudnn without touching cuda that's why I thought it will be better to have your library allowing for additional paths. |
I had a situation that dlib crashed when I did import it, in general I did the following. I changed setup.py and set it to compile Debug, but with Release it didn't work on Win 7 x 4 Py 3.7. link on setup_for Debug compile |
I instal version Dlib 19.7.0. on python 3,6.13
|
I work in: Windows10 Steps to reproduce
Details about conda and system ( conda info ):
What seams strange - that line virtual packages : __cuda=11.2=0 when I have CUDA10.1 All I did - just install dlib in new env and try to do import:
here is my windows PATH
and cudnn64_7.dll is in C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin |
I am facing the same error but on Python 3.9, I compiled it and everything seemed okay. But when i import dlib the before mentioned DLL error is displayed. EDIT: I got Cuda to run in WSL 2, so I'll probably stick with it even if windows gets fixed. I'd suggest dropping windows all together once WSL 2 is outside of the Windows insider program EDIT: after installing the expirmental CUDA for WSL driver it also worked on windows, but don't ask me why |
I had same issue when I compile dlib with CUDA enabled. "C:\Program Files\NVIDIA\CUDNN\v8.9.7.29\lib\cudnn.lib" "import dlib" failed with that error. When I move the filed under lib to "x64" as originally from cuDNN,zip "C:\Program Files\NVIDIA\CUDNN\v8.9.7.29\lib\x64\cudnn.lib" the problem solved. |
Expected Behavior
Current Behavior
Steps to Reproduce
git clone https://github.com/davisking/dlib.git
python setup.py install
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'))
The text was updated successfully, but these errors were encountered: