pex does not support musllinux wheels
See original GitHub issuePEP 656 introduced the musllinux
tag to support Alpine Linux and other cases where CPython does not use glibc.
I have confirmed that using python3 and pip in a venv a musllinux
wheel is downloaded.
pip install 'psycopg2-binary'
Collecting psycopg2-binary
Downloading psycopg2_binary-2.9.3-cp310-cp310-musllinux_1_1_x86_64.whl (1.9 MB)
ββββββββββββββββββββββββββββββββββββββββ 1.9/1.9 MB 8.5 MB/s eta 0:00:00
Installing collected packages: psycopg2-binary
Successfully installed psycopg2-binary-2.9.3
WARNING: You are using pip version 22.0.4; however, version 22.2.2 is available.
You should consider upgrading via the '/root/venv/bin/python3 -m pip install --upgrade pip' command.
However using pex results in:
pex --pip-version 22.2.2 --resolver-version pip-2020-resolver --no-build 'psycopg2-binary'
Failed to find compatible interpreter on path /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin.
Examined the following interpreters:
1.) /usr/bin/python3.10 CPython==3.10.5
No interpreter compatible with the requested constraints was found:
A distribution for psycopg2-binary could not be resolved for /usr/bin/python3.10.
Found 1 distribution for psycopg2-binary that do not apply:
1.) The wheel tags for psycopg2-binary 2.9.3 are cp310-cp310-musllinux_1_1_x86_64 which do not match the supported tags of /usr/bin/python3.10:
cp310-cp310-linux_x86_64
... 34 more ...
To reproduce the above run the following to get alpine linux with python3 in docker.
$ docker run --rm -it alpine:3.16
# apk update
# apk add python3
I suspect that this is related to how the vendored packaging library is 20.9
but the project added support for musllinux wheels in 21.0
. Unfortunately that release dropped support for Python 2 as well.
A possible fix would be to have --pip-version 22.2.2
also imply a newer version of the packaging
library.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
Support manylinux1 wheels Β· Issue #281 Β· pantsbuild/pex
I've been thinking about tackling this, but I can't decide how/whether to handle manylinux compatibility at buildtime. At runtime, you can justΒ ...
Read more >Tips and tricks - cibuildwheel - Read the Docs
Linux wheels are built in manylinux / musllinux containers to provide binary compatible wheels on Linux, according to PEP 600 / PEP 656....
Read more >pex Changelog - pyup.io
PEX created with interpreter constraints that did not specify the Python ... This release brings musllinux wheel support and a fix for a...
Read more >Wheels for musl (Alpine) - #36 by njs - Packaging
Then what I would prefer to see is that we start with musllinux (not alpine), and don't bother with the version number for...
Read more >Pants includes OS X specific Python wheels - Stack Overflow
One of the nice things about distributing your project as a PEX file is that you can prepare it to run on multiple...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ok, this is a good bit easier than I expected.