Xtra-Computing / thundergbm

ThunderGBM: Fast GBDTs and Random Forests on GPUs
Apache License 2.0
695 stars 88 forks source link

Could not find module 'C:\Users\thang\AppData\Roaming\Python\Python39\site-packages\thundergbm\thundergbm.dll' (or one of its dependencies). Try using the full path with constructor syntax. #53

Open dinhthang12t opened 3 years ago

dinhthang12t commented 3 years ago

Hi there, Many thanks for your good library. I have an issue when import TGBMClassifier: FileNotFoundError Traceback (most recent call last)

in 1 #from thundergbm import TGBMClassifier ----> 2 from thundergbm import TGBMClassifier 3 #clf = TGBMClassifier() ~\AppData\Roaming\Python\Python39\site-packages\thundergbm\__init__.py in 8 """ 9 name = "thundergbm" ---> 10 from .thundergbm import * ~\AppData\Roaming\Python\Python39\site-packages\thundergbm\thundergbm.py in 30 # print(lib_path) 31 if path.exists(lib_path): ---> 32 thundergbm = CDLL(lib_path) 33 else: 34 raise RuntimeError("Please build the library first!") c:\python\lib\ctypes\__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error, winmode) 372 373 if handle is None: --> 374 self._handle = _dlopen(self._name, mode) 375 else: 376 self._handle = handle FileNotFoundError: Could not find module 'C:\Users\thang\AppData\Roaming\Python\Python39\site-packages\thundergbm\thundergbm.dll' (or one of its dependencies). Try using the full path with constructor syntax. **I Checked the path above and the module thundergbm.dll already in that folder** ![image](https://user-images.githubusercontent.com/43467677/113963961-c2ee3d00-9854-11eb-8835-3c03456f6e20.png) Please help me fix this issue. Thank you very much for your help.
AlanSpencer2 commented 2 years ago

Did you solve the problem?

RNarayan73 commented 2 years ago

bumping up!

Kurt-Liuhf commented 2 years ago

Please provide more information to help us reproduce the bug, such as your system information and CUDA version. Did you build the library by yourself or install it via pip?

RNarayan73 commented 2 years ago

Hello, My system details are below: OS: Windows 11 Home Python: 3.9.13 cuda: 11.8 (this is cuda-python installed via conda; I don't have cuda installed directly in Windows)

I do not have C++ compilation tools and was looking for a ready to install package, so I picked up the latest win_amd64 that I thought would be appropriate and installed it. Installation was successful pip install thundergbm-0.3.12-py3-none-win_amd64.whl

But when trying to import TGBMClassifier: from thundergbm import TGBMClassifier I get the following error although the file exists in the location:

Traceback (most recent call last): File "", line 1, in File "C:\Anaconda3\envs\skl_py39\lib\site-packages\thundergbm__init__.py", line 10, in from .thundergbm import * File "C:\Anaconda3\envs\skl_py39\lib\site-packages\thundergbm\thundergbm.py", line 32, in thundergbm = CDLL(lib_path) File "C:\Anaconda3\envs\skl_py39\lib\ctypes__init.py", line 382, in init__ self._handle = _dlopen(self._name, mode) FileNotFoundError: Could not find module 'C:\Anaconda3\envs\skl_py39\lib\site-packages\thundergbm\thundergbm.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Hope this helps.

Narayan

RNarayan73 commented 2 years ago

Found this in the python documentation that may explain the issue: (https://docs.python.org/3/whatsnew/3.8.html#ctypes)

Hope this helps to fix the code.

Kurt-Liuhf commented 2 years ago

Hi @RNarayan73, thanks a lot for your help. We will fix this issue and get back to you soon. Please stay tuned.

RNarayan73 commented 1 year ago

Hello, @Kurt-Liuhf just wondering if you've had a chance to look into this yet?

liningbo commented 9 months ago

I had met the same proble. It is because lack cusparse64_10.dll for 0.3.12 and cusparse64_100.dll for 0.3.4, download cusparse64_10.dll for 0.3.12 and put it it in C:\Windows\System32 or python_install_path\Lib\site-packages\thundergbm. it can work.