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
If a package is not available then you will see an error,

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
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!
Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!