Python provides the
pip3 package manager in order to search, install, update and remove 3rd party Python packages. Both the pip and pip3 commands are provided via Python and used for different versions. In the event they are different commands in some cases they may refer to the same command or executable. In this tutorial, we examine if the pip and pip3 commands are the same or what is the difference between pip and pip3 commands.
pip Executable and Version
The pip command refers to the current active Python version. For example, if you are using only Python2 the pip refers to the Python 2 version. If the Python3 is used as the default version the pip command refers to the Python3 pip. First, we can check the
pip command executable file location with the
$ which pip
The pip command version can be also checked with the
--version options like below.
$ pip --version
From the output, we can see that the
pip command refers to Python 3.9 . This means the pip is the same as with the pip3 command.
pip3 Executable and Version
pip3 command is used for Python3 package management and can not be used with Python2. Like pip, we can use the
which command and
-V options in order to check the pip3 executable and version information like below.
$ which pip3 $ pip3 --version
Are pip and pip3 Commands The Same Executable?
According to the previous findings, we can decide whether the pip and pip3 are the same command or executable. We can see that pip is just a soft link to the current active Python version and related pip command. But the Python3 becomes the default Python version for most of the Linux distributions the pip and pip3 refer to the same command and executable these days.