The pip command is used to search, install, update and uninstall Python 3rd party modules in an easy way. Every module has a version and is updated in different periods. The pip command is also described as a module that is special and also has a version number. In this tutorial, we examine how to find the version number for the pip command itself.
Find pip command Version
The pip command provides the
-V option in order to list version information about itself. The -V option is the short form of the version.
$ pip -V
pip 20.1.1 from /usr/lib/python3/dist-packages/pip (python 3.8)
We can see that pip version via the output. This version information contains some numbers related to the major and minor version numbers. Also, the underlying Python interpreter version is displayed too.
- The Major Version is 20 which changes reraly when a big update occurs.
- The Minor Version is 1 which changes periodically with some feature, bug and security updates.
- The Build Number is 1 which changes often with even very minor updates.
Alternatively, the long form of the version option can be used which is
$ pip --version
In some cases for different operating systems and installations, the pip can be also named like
pip3 . The same options can be used to show pip3 version information like below.
$ pip3 -V
Find pip As Module Version
The python or python3 commands can be used to display the currently install pip module version. The
-m option is used to provide the pip as module name and
--version is used to print version information. Use python or python3 commands according to your operating system and installation which may change for different installations.
$ python3 -m pip --version
Or for the installations with the python name;
$ python -m pip --version