pip install see the list of all available versions of package



When you are making use of the pip install command and you want to see the list of all available versions for a particular Python package, then you can make use of the pip index command.

Syntax:

pip index versions <package-name>

Example:

pip index versions torch

torch (2.0.1)
Available versions: 2.0.1, 2.0.0
pip index versions requests

requests (2.31.0)
Available versions: 2.31.0, 2.30.0, 2.29.0, 2.28.2, 2.28.1,
 2.28.0, 2.27.1, 2.27.0, 2.26.0, 2.25.1, 2.25.0, 2.24.0, 2.23.0,
 2.22.0, 2.21.0, 2.20.1, 2.20.0, 2.19.1, 2.19.0, 2.18.4, 2.18.3,..
, 0.3.1, 0.3.0, 0.2.4, 0.2.3, 0.2.2, 0.2.1, 0.2.0

  INSTALLED: 2.31.0
  LATEST:    2.31.0

Note: You will see a warning when you run this command.

WARNING: pip index is currently an experimental command. It may be removed/changed in a future release without prior warning.

If a package is not available then you will see an error,

ERROR: No matching distribution found for curl

Example - pip install see the list of all available versions of package

pip: Check Version of a Package

We can make use of the pip show command to get the version detail of any package.

pip show requests          
Name: requests
Version: 2.31.0
Summary: Python HTTP for Humans.
Home-page: https://requests.readthedocs.io
Author: Kenneth Reitz
Author-email: me@kennethreitz.org
License: Apache 2.0
Location: /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages
Requires: certifi, charset-normalizer, idna, urllib3
Required-by: azure-core, jupyterlab_server
-

Facing issues? Have Questions? Post them here! I am happy to answer!


Author: Rakesh
Author Info:

Rakesh is a seasoned developer with over 10 years of experience in web and app development, and a deep knowledge of operating systems. Author of insightful How-To articles for Code2care.

Follow him on: X

Copyright © Code2care 2023 | Privacy Policy | About Us | Contact Us | Sitemap