Skip to content
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

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 this issue Apr 8, 2021 · 8 comments

Comments

@dinhthang12t
Copy link

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.

@AlanSpencer2
Copy link

AlanSpencer2 commented Dec 22, 2021

Did you solve the problem?

@RNarayan73
Copy link

bumping up!

@Kurt-Liuhf
Copy link
Collaborator

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
Copy link

RNarayan73 commented Oct 28, 2022

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
Copy link

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
Copy link
Collaborator

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

@RNarayan73
Copy link

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

@liningbo
Copy link

liningbo commented Mar 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants