Bootstrap FreeKB - PIP - List installed packages using the pip list command
PIP - List installed packages using the pip list command

Updated:   |  PIP articles

The pip list command will display the packages (a.k.a modules) that have been installed in Python.

~]$ pip list
Package      Version
------------ -------
bcrypt       4.0.1
cffi         1.16.0
cryptography 41.0.5
paramiko     3.3.1
pip          21.1.3
pycparser    2.21
PyNaCl       1.5.0
setuptools   56.0.0

 

It's important to recognize that the pip command will be associated with a particular version of Python, which can be seen with the pip --version command. In this example, pip is part of Python version 3.9.6.

~]$ pip --version
pip 23.3.1 from /usr/local/bin/python3.9.6/lib/python3.9/site-packages/pip (python 3.9)

 

Or with the -v or --verbose flag.

~]$ pip list -v
Package      Version Location                                               Installer
------------ ------- ------------------------------------------------------ ---------
bcrypt       4.0.1   /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip
cffi         1.16.0  /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip
cryptography 41.0.5  /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip
paramiko     3.3.1   /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip
pip          21.1.3  /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip
pycparser    2.21    /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip
PyNaCl       1.5.0   /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip
setuptools   56.0.0  /usr/local/bin/python3.9.6/lib/python3.9/site-packages pip

 

The following can be used if you want to list the packages installed in a specific version of Python.

~]$ /usr/bin/python3.6 -m pip list --verbose
Package            Version   Location                                         Installer
------------------ --------- ------------------------------------------------ ---------
pip                21.3.1    /usr/local/lib/python3.6/site-packages           pip
setuptools         39.2.0    /usr/lib/python3.6/site-packages                 pip

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter a8c99c in the box below so that we can be sure you are a human.