How To Install PIP (Python Package Manager) In Linux?

Python provides 3rd party packages for extra features. These packages are provided by different developers via the Python Package Index or PyPI . The pip command is used to manage (search, install, updated, remove) these packages. The pip command can be also named as pip2 for Python2 and pip3 for Python3. Linux distributions like Ubuntu, Debian, Mint, Kalie, RHEL, CentOS etc. can use the pip tool in order to manage Python packages.

Install PIP On Debian/Ubuntu

deb based distributions like Debian, Ubuntu, and Mint provide the PIP with the package name python-pip for Python2 and python3-pip for Python3. We can install PIP like below for Debian, Ubuntu, and Mint.

PIP for Python2

$ apt install python-pip

PIP for Python3

$ apt install python3-pip

Install PIP On CentOS/RHEL

The PIP can be installed on CentOS and RHEL distributions with the following commands.

$ yum install python-pip

Install PIP On Fedora

Fedora provides the PIP with the package name python-pip .

$ dnf install python-pip

Install PIP On Arch Linux

Arch Linux is another popular Linux distribution where PIP is also provided.

PIP for Python2

$ pacman -S python2-pip

PIP for Python3

$ pacman -S python-pip

List Installed PIP Version

The PIP is a dynamic tool that is updated regularly. After installing the PIP the version information can be listed with the --version option.

$ pip --version

Alternatively, the -V option can be used to print the pip version.

List PIP Help

The help information about the pip command can be printed with the --help option.

$ pip --help

Search Python Packages with PIP

A 3rd party Python package can be searched with the pip command by using the search parameter.

$ pip search django

Install Python Packages with PIP

The install parameter is used with the pip command in order to install packages.

$ pip install django
See also  How To Search In Vim/Vi?

Leave a Comment