Home >Backend Development >Python Tutorial >How to List Available Package Versions with Pip?
List Available Package Versions with Pip
To retrieve a list of all possible versions for a Python package installable via pip, follow these steps:
For pip >= 21.2:
pip index versions package_name
Note: This command is experimental and subject to future changes.
For pip >= 21.1:
pip install package_name==
For pip >= 20.3:
pip install --use-deprecated=legacy-resolver package_name==
For pip >= 9.0:
pip install package_name==
Pip will display the available versions without initiating any downloads or installations.
For pip < 9.0:
pip install package_name==blork
where "blork" is a non-valid version string.
The above is the detailed content of How to List Available Package Versions with Pip?. For more information, please follow other related articles on the PHP Chinese website!