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

RuntimeError: Please build the library first! #50

Open
Weidong725 opened this issue Dec 30, 2020 · 5 comments
Open

RuntimeError: Please build the library first! #50

Weidong725 opened this issue Dec 30, 2020 · 5 comments

Comments

@Weidong725
Copy link

After win10 system is successfully installed through. whl file.The following error occurred during import:

RuntimeError Traceback (most recent call last)
in
----> 1 import thundergbm

E:\Anaconda\envs\tf\lib\site-packages\thundergbm_init_.py in
8 """
9 name = "thundergbm"
---> 10 from .thundergbm import *

E:\Anaconda\envs\tf\lib\site-packages\thundergbm\thundergbm.py in
32 thundergbm = CDLL(lib_path)
33 else:
---> 34 raise RuntimeError("Please build the library first!")
35
36 OBJECTIVE_TYPE = ['reg:linear', 'reg:logistic', 'binary:logistic',

RuntimeError: Please build the library first!

@zeyiwen
Copy link
Collaborator

zeyiwen commented Dec 31, 2020

You have the issue, possibly because of #49. Please try to build the .whl file on your own. Our team is very busy recently due to several paper deadlines, and will look into the issues at a later stage.

@Kunjal1999
Copy link

Kunjal1999 commented Mar 31, 2021

You have the issue, possibly because of #49. Please try to build the .whl file on your own. Our team is very busy recently due to several paper deadlines, and will look into the issues at a later stage.

I am facing the same issue after git cloning, building and pip installing thundergbm on linux.
Whenever I run
from thundergbm import *,
I face the same error.

When I run
mkdir build && cd build && cmake .. && make -j

I face:

CMakeFiles/Makefile2:168: recipe for target 'src/thundergbm/CMakeFiles/thundergbm.dir/all' failed
make[1]: *** [src/thundergbm/CMakeFiles/thundergbm.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

@Kurt-Liuhf
Copy link
Collaborator

Hi @Kunjal1999, thanks for the comments.

You couldn't import the library because you haven't built the library successfully. So you should check the library building process. Here are some suggestions that might help.

  • Refer to the document as @zeyiwen mentioned.Make sure to initialize and update the submodules.
  • Check the version of CUDA. If you are using CUDA > 11.0, you need to clone the support_cuda_11 branch.
  • We couldn't reproduce your result on a Unbuntu 16.0.4 with CUDA 11.0. So introducing your system configurations and uploading the entire error stack will be more appreciated.

Thanks.

@Kunjal1999
Copy link

Hi @Kunjal1999, thanks for the comments.

You couldn't import the library because you haven't built the library successfully. So you should check the library building process. Here are some suggestions that might help.

  • Refer to the document as @zeyiwen mentioned.Make sure to initialize and update the submodules.
  • Check the version of CUDA. If you are using CUDA > 11.0, you need to clone the support_cuda_11 branch.
  • We couldn't reproduce your result on a Unbuntu 16.0.4 with CUDA 11.0. So introducing your system configurations and uploading the entire error stack will be more appreciated.

Thanks.

Hey, thanks for the reply, I was running the commands on Google Colab.
CUDA:

nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Wed_Jul_22_19:09:09_PDT_2020
Cuda compilation tools, release 11.0, V11.0.221
Build cuda_11.0_bu.TC445_37.28845127_0

@Kurt-Liuhf
Copy link
Collaborator

Some bash commands to install ThunderGBM on Colab:
# clone and init submodules
!git clone -b support_cuda11 https://github.com/Xtra-Computing/thundergbm
!cd thundergbm && git submodule init && git submodule update && mkdir build
# build the library
!cd thundergbm/build && cmake .. && make -j 10
# test if built successfully
!cd thundergbm/build && ./bin/thundergbm-train data=../dataset/test_dataset.txt
# build wheel file and install it with pip
# clear the dist dir
!cd thundergbm/python && ls dist && rm -rf dist/* && ls dist
# generate the wheel file and install
!cd thundergbm/python && ls && python setup.py bdist_wheel && cd dist && ls && pip install `ls`

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

4 participants