thundersvm icon indicating copy to clipboard operation
thundersvm copied to clipboard

FileNotFoundError: ... thundersvm.dll' (or one of its dependencies)

Open MLPeter1989 opened this issue 4 years ago • 7 comments

Hi there thank you for offering to help. Made my first account on Github today! :)

After building using Visual Studio and installing using the "cd python && python setup.py install" command. Python still cannot find the thundersvm.dll file. Please help! I've been stuck on this for two days now...

Really appreciate any help at all!!

Capture

MLPeter1989 avatar Oct 14 '20 23:10 MLPeter1989

Python 3.8 has changed which DLLs get loaded. Now only system (C:\Windows\System32) DLLs, and those included with os.add_dll_directory are loaded. In my case (CUDA 10.2) cusparse64_10.dll wasn't installed into a system directory so either:

  • Copy cusparse64_10.dll into a system directory
  • Call os.add_dll_directory before importing thundersvm

zacps avatar Jan 11 '21 22:01 zacps

I am facing the same issue!!!!!!!!!!!!

Ericocococo avatar Sep 16 '21 07:09 Ericocococo

@296348304 Eric, can you try the solution suggest by @zacps and see if it works?

zeyiwen avatar Sep 17 '21 02:09 zeyiwen

I had the same issue. I tried @zacps suggestion. Copied cusparse64_10.dll into a system directory. Now working fine... Thank you

Arravind1212 avatar Dec 10 '21 17:12 Arravind1212

hi! I had the same issue. I tried Copied cusparse64_10.dll into a system directory. but it still not work ,how can i do to solve it thank you

Chailchai avatar Aug 23 '23 03:08 Chailchai

Hi Chailchai, there are a lot of potential issues (this repo is missing a lot of documentation / is in need of a solid update), but basically per @zacps, it's probable that the DLL dependencies related to CUDA are not being found. CUDA libraries should be located in the CUDA installation directory on your system. Typically, this would be something like C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin (adjusting the version number to match your installed version).

Starting with Python 3.8, the way Python searches for DLLs has changed, and you now need to explicitly add directories to the DLL search path using os.add_dll_directory.

In my case, all the .dll files (including cusparse64_11.dll in my case, as I am using CUDA 11.1) are in the directory I mentioned above, so I added this line of code before import thundersvm and it worked.

os.add_dll_directory("C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v11.1\\bin")
import thundersvm
from thundersvm import SVC

ericlaycock avatar Oct 12 '23 21:10 ericlaycock

@ericlaycock Thanks a lot eric for the detailed explanation, it helped!

anirudhpm avatar Jan 09 '24 16:01 anirudhpm