-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
[ci] fix build python #6026
[ci] fix build python #6026
Conversation
4b34b3a
to
1d4b02e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What led to this PR? What evidence do you have that build-python.sh
is installing the latest release instead of the development version?
The use of pip install --find-links=.
should mean that the script only looks for the package locally.
You can test this for yourself like this:
echo "raise RuntimeError('beep boop')" >> python-package/lightgbm/__init__.py
sh build-python.sh install
You should see a line like the following confirming that it's the release version (4.0.0.99
) being installed
Successfully installed lightgbm-4.0.0.99 numpy-1.25.2 scipy-1.11.1
And then that error when importing, proving that the version built from local was installed
python -c "import lightgbm"
Traceback (most recent call last):
File "", line 1, in
File "/Users/James.Lamb/miniconda3/lib/python3.9/site-packages/lightgbm/init.py", line 37, in
raise RuntimeError('beep boop')
RuntimeError: beep boop
Sorry, somehow I erroneously thought that v4.0.0 was installed instead of v4.0.0.99. After checking again, the current script works just fine. Close this. |
This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this. |
The python package installation from source with
build-python.sh
will always install the latest released version.LightGBM/build-python.sh
Line 362 in 20975ba
Change this to install the built tar.gz file.