Home  >  Article  >  Backend Development  >  How to List Available Package Versions with Pip?

How to List Available Package Versions with Pip?

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2024-10-18 19:42:03655browse

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn