Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.55k stars 215 forks source link

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

Open MLPeter1989 opened 3 years ago

MLPeter1989 commented 3 years ago

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

zacps commented 3 years ago

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:

Ericocococo commented 2 years ago

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

zeyiwen commented 2 years ago

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

Arravind1212 commented 2 years ago

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

Chailchai commented 10 months ago

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

ericlaycock commented 9 months ago

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
anirudhpm commented 6 months ago

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