Reputation: 14018
I recently needed to download Python packages on a macOS machine with Python 3.7 to deploy later on a Linux machine with Python 3.7.
I therefore executed the following command to download the needed packages:
pip3 download --platform manylinux1_x86_64 --python-version 3.7 --abi cp37m --only-binary :all: <package>
However, some of the packages were not obtainable using the above command. After some experimenting, I could download them using --abi cp37
instead of --abi cp37m
.
How can I check which versions (platform,version,abi) of a package are available using pip3
?
Upvotes: 4
Views: 2717
Reputation: 94827
I managed to limit the list of versions returned by pip install package==
using --platform=
and other options. For example, tensorflow with platform tag manylinux1_x86_64
:
$ pip install --platform=manylinux1_x86_64 --no-deps -t /tmp tensorflow==
Collecting tensorflow==
ERROR: Could not find a version that satisfies the requirement tensorflow== (from versions: 0.12.0rc0, 0.12.0rc1, 0.12.0, 0.12.1, 1.0.0, 1.0.1, 1.1.0rc0, 1.1.0rc1, 1.1.0rc2, 1.1.0, 1.2.0rc0, 1.2.0rc1, 1.2.0rc2, 1.2.0, 1.2.1, 1.3.0rc0, 1.3.0rc1, 1.3.0rc2, 1.3.0, 1.4.0rc0, 1.4.0rc1, 1.4.0, 1.4.1, 1.5.0rc0, 1.5.0rc1, 1.5.0, 1.5.1, 1.6.0rc0, 1.6.0rc1, 1.6.0, 1.7.0rc0, 1.7.0rc1, 1.7.0, 1.7.1, 1.8.0rc0, 1.8.0rc1, 1.8.0, 1.9.0rc0, 1.9.0rc1, 1.9.0rc2, 1.9.0, 1.10.0rc0, 1.10.0rc1, 1.10.0, 1.10.1, 1.11.0rc0, 1.11.0rc1, 1.11.0rc2, 1.11.0, 1.12.0rc0, 1.12.0rc1, 1.12.0rc2, 1.12.0, 1.12.2, 1.12.3, 1.13.0rc0, 1.13.0rc1, 1.13.0rc2, 1.13.1, 1.13.2, 1.14.0rc0, 1.14.0rc1, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
The last version returned is 2.0.0b1
. Let's verify it at PyPI: version 2.0.0b1
has releases with that tag, later versions switched to manylinux2010_x86_64
and are not listed with the command above.
Upvotes: 1