How To Install Python Pip For Linux?

Python provides a tool named pip in order to install python modules. Most of the python applications use pip in order to install dependencies. In order to use pip we should install it.  In this tutorial, we will look at how to install pip  for Python 2 and Python 3.

Install For Python 2 On Ubuntu, Debian, Mint, Kali

We can install pip for Python for apt based distributions like below. The pip tools is provided with the package named python-pip for Python2.

$ sudo apt install python-pip
Install For Python 2 On Ubuntu, Debian, Mint, Kali
Install For Python 2 On Ubuntu, Debian, Mint, Kali

Install For Python 3 On Ubuntu, Debian, Mint, Kali

pip for Python3 is named with the different package name. So we will use the following command in order to install for Python 3. This time we will install python3-pip package which provides the pip command for Python3.

$ sudo apt install python3-pip
Install For Python 3 On Ubuntu, Debian, Mint, Kali
Install For Python 3 On Ubuntu, Debian, Mint, Kali

Install For Python 2 On Fedora, CentOS, RedHat

Fedora, CentOS, RedHat are the same type of distributions use rpm or yum . We can install pip for Python 2 with the following command. The package name will be python-pip.

$ sudo yum install python-pip
Install For Python 2 On Fedora, CentOS, RedHat
Install For Python 2 On Fedora, CentOS, RedHat

Install For Python 3 On Fedora, CentOS, RedHat

Python3 pip can be installed with the package named python3-pip. We will again use the yum install command like below.

$ sudo yum install python3-pip
Install For Python 3 On Fedora, CentOS, RedHat
Install For Python 3 On Fedora, CentOS, RedHat

Print Python Pip Version

After installing the Python Pip we can print the exact version of the pip command. We can use -V or --version option in order to print the pip command version. We can use for pip, pip2 or pip3 commands like below.

$ pip -V
$ pip --version
OR
$ pip3 -V
$ pip3 --version
OR
$ pip2 -V
$ pip2 --version
Print Python Pip Version
Print Python Pip Version

1 thought on “How To Install Python Pip For Linux?”

Leave a Comment