pip: On PyPy, binary wheels broken on pip==20.0.1
Environment
- pip version: 20.0.1
- Python version: PyPy (tested with 7.2.0 and 7.3.0)
- OS: tested on linux, likely affects other OS as well
Description If you try to install a manylinux wheel (such as the ones produced here), pip 20.0.1 complains:
xxx.whl is not a supported wheel on this platform.
pip==19.3.1
installs it correctly.
Expected behavior I would expect the wheel to be installed correctly 😃
How to Reproduce
First, download and install PyPy 7.2.0, and install pip==19.3.1:
$ wget -q https://bitbucket.org/pypy/pypy/downloads/pypy2.7-v7.2.0-linux64.tar.bz2
$ tar xf pypy2.7-v7.2.0-linux64.tar.bz2
homer pip-bug $ ./pypy2.7-v7.2.0-linux64/bin/pypy -m ensurepip
[...]
homer pip-bug $ ./pypy2.7-v7.2.0-linux64/bin/pypy -m pip install -U pip==19.3.1
[...]
Successfully installed pip-19.3.1
Then, download and install a manylinux wheel: it works correctly:
$ wget -q https://antocuni.github.io/pypy-wheels/manylinux2010/psutil/psutil-5.6.5-pp272-pypy_41-manylinux2010_x86_64.whl
$ ./pypy2.7-v7.2.0-linux64/bin/pypy -m pip install psutil-5.6.5-pp272-pypy_41-manylinux2010_x86_64.whl
[...]
Successfully installed psutil-5.6.5
Finally, upgrade to pip 20.0.1 and try again:
$ ./pypy2.7-v7.2.0-linux64/bin/pypy -m pip install -U pip==20.0.1
[...]
Successfully installed pip-20.0.1
$ ./pypy2.7-v7.2.0-linux64/bin/pypy -m pip install psutil-5.6.5-pp272-pypy_41-manylinux2010_x86_64.whl
[...]
ERROR: psutil-5.6.5-pp272-pypy_41-manylinux2010_x86_64.whl is not a supported wheel on this platform.
I tried it with PyPy 7.3.0 as well, same result.
More info
I tried to debug it a bit. I managed to reduce the difference to this snippet:
from pip._internal import pep425tags
from pip._internal.models.wheel import Wheel
print 'Supported tags'
tags = pep425tags.get_supported()
for tag in tags:
print ' ', tag
print
print 'File tags'
wheel = Wheel('psutil-5.6.5-pp272-pypy_41-manylinux2010_x86_64.whl')
for tag in wheel.file_tags:
print ' ', tag
With pip==20.0.1, I get this:
Supported tags
pp27-pypy_41-manylinux2014_x86_64
pp27-pypy_41-manylinux2010_x86_64
pp27-pypy_41-manylinux1_x86_64
pp27-pypy_41-linux_x86_64
[...]
File tags
pp272-pypy_41-manylinux2010_x86_64
Note that “supported tags” start with pp27-
, while “file tags” start with pp272-
, so Wheel.supported
returns False
.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 20
- Comments: 30 (21 by maintainers)
Commits related to this issue
- Pin version of pip; see pypa/pip#7629 — committed to angr/ci-settings by rhelmot 4 years ago
- Temporarily pin pip to any version <20 There was an issue recently introduced with pip 20.0.1 that prevents binary wheels from being installed. This will result in failed setup of angr-dev. Until it ... — committed to mborgerson/angr-dev by mborgerson 4 years ago
- Temporarily pin pip to any version <20 There was an issue recently introduced with pip 20.0.1 that prevents some binary wheels from being installed. This will result in failed setup of angr-dev. Unti... — committed to mborgerson/angr-dev by mborgerson 4 years ago
- Temporarily pin pip to any version <20 There was an issue recently introduced with pip 20.0.1 that prevents some binary wheels from being installed. This will result in failed setup of angr-dev. Unti... — committed to angr/angr-dev by mborgerson 4 years ago
- Fix #7629: Restore legacy PyPy wheel interpreter tags pip used to calculate the interpreter tag for PyPy (and other non-CPython implementations) incorrectly. This was fixed as part of the migration t... — committed to ncoghlan/pip by ncoghlan 4 years ago
- Avoiding `pip==20.0` and `pip==20.0.1`. See some recent issues filed with these releases, e.g. https://github.com/pypa/pip/issues/7629 — committed to dhermes/bezier by dhermes 4 years ago
- Avoiding `pip==20.0` and `pip==20.0.1`. (#192) See some recent issues filed with these releases, e.g. https://github.com/pypa/pip/issues/7629 — committed to dhermes/bezier by dhermes 4 years ago
- Avoid pip bug pypa/pip#7629 See https://github.com/pypa/pip/issues/7629 — committed to astro-informatics/ssht by mdavezac 4 years ago
CMake installation via pip is broken with pip version >= 20 because of this issue.
I am not sure how prevalent it is, there are wheels like that for cmake that simply use pip as a platform and channel to distribute their manylinux binaries. These packages do not actually come with any Python or Python ABI requirements. Maybe it makes some sense to add new tags that makes the intention and requirements of these style of packages explicit.
@ncoghlan Are you still planning to look at this? The 20.1 release is due in April, and you mentioned above that there was potentially “a lot of work” here.
@antocuni If @ncoghlan doesn’t have time to work on this, the likely blocker is anyone having time to pick up the outstanding work here.
Note that the PR for this issue should probably be split, with the warning deferred to a follow up enhancement.
Actually implementing what @chrahunt suggested for the warning in https://github.com/pypa/pip/pull/7655#pullrequestreview-351954175 would be quite a bit of work. Taking the warning out entirely, and letting someone keen to deprecate the workaround add the warning later would be easy.
I think the python tag change from pp272 to pp27 is desirable, and in line with the discussion in pypa/packaging#233 and pypa/packaging#184. The pip19 python tag “pp272” is “pp” for pypy, “2” for python2, and “72” for pypy7.2.x. The python tag “pp27” is “pp” for pypy and “27” for python 2.7. Going forward, the new tag is more correct, especially as we start to support python3.6 and 3.7. Under the old naming scheme, both python3.6 and python3.7 would have the same python tag.
How to deal with the transition period? There are very few PyPy wheels on PyPI, most of them are on https://antocuni.github.io/pypy-wheels. Perhaps that site could host pip19 and pip20 wheels for a while, doubling the number of wheels there. Once the pip20 release stabilizes, PyPy could bundle pip20 with PyPy.