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

[ci] fix build python #6026

Closed
wants to merge 5 commits into from
Closed

[ci] fix build python #6026

wants to merge 5 commits into from

Conversation

shiyu1994
Copy link
Collaborator

The python package installation from source with build-python.sh will always install the latest released version.

lightgbm

Change this to install the built tar.gz file.

Copy link
Collaborator

@jameslamb jameslamb left a 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

@shiyu1994
Copy link
Collaborator Author

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.

@shiyu1994 shiyu1994 closed this Aug 8, 2023
@jameslamb jameslamb deleted the ci/fix-build-python branch August 8, 2023 15:02
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants