What is Pip?

Pip Installs Packages (Pip) is a package management system that simplifies the process of installing and managing software packages written in Python.

Pip is a command line program. When installed, the Pip command line is added to the system. All packages listed in the Python Package Index (PyPI) can be installed using Pip. It comes as standard on Python 2.7.9 or higher (on Python series 2) and Python 3.4 or greater (on Python series 3).

Now let’s jump into how to install Pip on Centos 7.

How to Install Pip on CentOS 7

Installing Pip on CentOS 7 is a very simple process.

There are two methods:

  1. Install with Curl and Python
  2. Install with Yum

Option 1: Install Pip with Curl and Python

To download Pip from the official repository and install it using Curl and Python, type the following:

curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"

python get-pip.py

Next, verify the installation by typing:

pip -V

Pip version may vary, but the output format is as seen below:

OUTPUT

pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)

Option 2: Install Pip with Yum

By default, Pip is part of the Extra Packages for Enterprise Linux (EPEL) repository. If you still haven’t enabled the EPEL repository, you can do so by opening the terminal (if you are working locally) or by connecting to the CentOS 7 server via SSH and then running the following command:

sudo yum install epel-release

Confirm the installation process and wait for the system to complete the task.

installing pip with CentOS yum example

It is highly recommended to update your packages.

Run the following command:

sudo yum –y update

Verify the installation with pip –V.

Conclusion

Pip’s emphasis on code readability and ease of use make it the go-to solution for installing and managing Python software packages.

Great job, you have finished installation of Pip on CentOS 7.