'What are the valid values for --platform, --abi, and --implementation for pip download?
pip download has several flags that I would like to play with --platform
, --abi
, and --implementation
.
Where can I find the complete list of valid values for these flags?
Solution 1:[1]
I don't think there is one definitive list. You have to collect it from different sources. Start with PEP 425: https://www.python.org/dev/peps/pep-0425/
python tag: ‘py27’, ‘cp33’
abi tag: ‘cp32dmu’, ‘none’
platform tag: ‘linux_x86_64’, ‘any’
--implementation
:
cp: CPython
ip: IronPython
pp: PyPy
jy: Jython
--platform
:
win32
linux_i386
linux_x86_64
Solution 2:[2]
If you have access to the PC (or similar platform) for which you need to download the package, per the documentation, the following function can be called to get the explicit platform name.
distutils.util.get_platform()
The platform tag is simply
distutils.util.get_platform()
with all hyphens - and periods . replaced with underscore _.
In our case, we have offline PCs (which must remain offline); so this approach works perfectly to ensure we download the correct platform for those PCs.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | S3DEV |