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

manylinux1 wheel no longer gets downloaded with the latest pip version #2707

Closed
Toad2186 opened this issue Jan 22, 2020 · 4 comments
Closed

Comments

@Toad2186
Copy link

Toad2186 commented Jan 22, 2020

Environment info

Operating System: Ubuntu 18.04 (Docker)

CPU/GPU model: N/A

C++/Python/R version: Python: 3.7.3, gcc 7.4.0, no R.

LightGBM version or commit hash: 2.3.1 (From pip)

Error message

(Not really an error, see below)

Reproducible examples

Using the latest (20.0.1) version of pip gets you building a from-source version of lightgbm.

(test) root@269ac7781b82:# pip --version
pip 20.0.1 from /tmp/test/lib/python3.7/site-packages/pip (python 3.7)
(test) root@269ac7781b82:# pip install lightgbm
Collecting lightgbm
  Using cached lightgbm-2.3.1.tar.gz (679 kB)

Using a pre-20 version of pip gets you the prebuilt manylinux wheel:

(test) root@269ac7781b82:# pip --version
pip 19.2.2 from /tmp/test/lib/python3.7/site-packages/pip (python 3.7)
(test) root@269ac7781b82:# pip install lightgbm
Collecting lightgbm
  Using cached https://files.pythonhosted.org/packages/0b/9d/ddcb2f43aca194987f1a99e27edf41cf9bc39ea750c3371c2a62698c509a/lightgbm-2.3.1-py2.py3-none-manylinux1_x86_64.whl

I think pip changed the way it parses wheels such that py3-none-manylinux1 no longer works, but I'm not sure if this is a valid wheel configuration/name per the RFC. Note that this works:

(test) root@269ac7781b82:# pip --version
pip 20.0.1 from /tmp/test/lib/python3.7/site-packages/pip (python 3.7)
(test) root@269ac7781b82:# pip install lightgbm-2.3.1-py2.py37-none-manylinux1_x86_64.whl
Processing ./lightgbm-2.3.1-py2.py37-none-manylinux1_x86_64.whl

(Using py37 instead of py3)

Steps to reproduce

  1. Install lightgbm on a manylinux1-compatible OS via pip.
  2. With pip >= 20, note that it gets built from source
  3. With pip < 20, note that the pre-built wheel is downloaded.

I'm not sure if this is intentional from the pip team and lightgbm needs to change, or vice versa, so starting here first.

@StrikerRUS
Copy link
Collaborator

StrikerRUS commented Jan 22, 2020

@Toad2186 Thank you very much for the insight!

For wheel naming schema, please refer to https://www.python.org/dev/peps/pep-0491/#file-name-convention.

@StrikerRUS
Copy link
Collaborator

@Toad2186
Copy link
Author

Toad2186 commented Jan 23, 2020

I took a look, and this PR from packaging should fix it (But needs to be merged into pip upstream):
pypa/packaging#258

tl;dr the problem is an exhausted iterator that was being reused.

Thanks for the quick reply @StrikerRUS! Doesn't seem like it's something actionable for LightGBM.

@StrikerRUS
Copy link
Collaborator

@Toad2186 Thank you for your investigation!

But needs to be merged into pip upstream

Inspiring a hope post from pip maintainer:

pradyunsg commented 3 hours ago
Expect a bugfix release for this tomorrow, assuming I recover from my current headache by then. :)
pypa/pip#7626 (comment)

@lock lock bot locked as resolved and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants