-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
(transferred) [python-package] how to install the Python package from source? #6437
Comments
@NigamSomya To install the Python package from a local copy of LightGBM, run the following: sh build-python.sh install For details on how to customize that, follow the docs at https://github.com/microsoft/LightGBM/blob/master/python-package/README.rst. You can ask here if you have other questions or concerns. |
Hi! Thanks that worked successfully, but it installed the package in this directory C:\Users\snigam\AppData\AppData2\Lib\site-packages\lightgbm\ which is not picking up the changes that I made to the dcg_calculator.cpp Plus, when I cloned the source code in a different directory, I expected the command that you shared would install the necessary files in that directory only. Please help. |
What evidence do you see the the changes you've made to LightGBM's source code are not being picked up in the Python package? Just to be sure you understand...the Python package will not contain any If you run the command I show you from the root of the same repo where you changed any
The command I shared will build the If you want to control that more tightly, omit the sh build-python.sh bdist_wheel That will create a file with a name like |
Hi! Also, the same thing happened when I tried to use this command sh build-python.sh bdist_wheel. Couldn't find anything named lightgbm-4.3.0.99-py3-none-win_amd64.whl. Must have been installed in the default directory and it behaves like the usual lightgbm package. |
LightGBM's Python package does not support editable installs. This command builds a wheel and installs it with sh build-python.sh bdist_wheel install This command builds a wheel and places it in the directory sh build-python.sh bdist_wheel And then you are free to install it however you'd install other Python wheels. For example, like this: pip install --no-deps ./dist/lightgbm-4.3.0.99-py3-none-win_amd64.whl
To help you, we need more information than what you've provided.
Some things to try:
|
Closing this due to lack of response. |
Description
migrated from #5053 (comment)
Hi!
I am trying to increase kMaxPosition = 10000 for my project, but I am not able to compile the source code.
I am stuck here.
Install the python package by cd into LightGBM/python-package and python setup.py install --precompile
Since, setup.py has been deprecated, I tried using flit to install the package. But I am getting this. Please help.
error: subprocess-exited-with-error
I tried this as well
python -m pip install --upgrade pip setuptools
, but it didn't work.If there's any other way to increase
'kMaxPosition'
, please share.The text was updated successfully, but these errors were encountered: