thundergbm icon indicating copy to clipboard operation
thundergbm copied to clipboard

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.

Open dinhthang12t opened this issue 3 years ago • 8 comments

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 Please help me fix this issue. Thank you very much for your help.

dinhthang12t avatar Apr 08 '21 03:04 dinhthang12t

Did you solve the problem?

AlanSpencer2 avatar Dec 22 '21 14:12 AlanSpencer2

bumping up!

RNarayan73 avatar Oct 27 '22 22:10 RNarayan73

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?

Kurt-Liuhf avatar Oct 28 '22 10:10 Kurt-Liuhf

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 avatar Oct 28 '22 12:10 RNarayan73

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.

RNarayan73 avatar Oct 31 '22 23:10 RNarayan73

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

Kurt-Liuhf avatar Nov 01 '22 03:11 Kurt-Liuhf

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

RNarayan73 avatar Jan 04 '23 21:01 RNarayan73

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.

liningbo avatar Mar 05 '24 12:03 liningbo