# How to install PIP on CentOS 8?

{% embed url="<https://youtu.be/3bZEkYnuV_A>" %}

### **Overview** <a href="#howtoinstallpiponcentos8-introduction" id="howtoinstallpiponcentos8-introduction"></a>

For the Python programming language, there is a package management called **pip**. Python plugins and other software packages can be installed more quickly and easily with the help of pip.

There are two versions: a legacy version for Python 2 and the most recent version, which is for Python 3.

This tutorial will demonstrate how to set up pip on CentOS 8 for Python 2 and Python 3.

### **Prerequisites** <a href="#howtoinstallpiponcentos8-prerequisites" id="howtoinstallpiponcentos8-prerequisites"></a>

There are certain prerequisites that need to be met before you begin.&#x20;

* A machine running CentOS 8
* A root user having Sudo privileges
* Internet connection

### Get Started <a href="#howtoinstallpiponcentos8-pipinstallationforpython3" id="howtoinstallpiponcentos8-pipinstallationforpython3"></a>

#### **a. pip installation for Python 3** <a href="#howtoinstallpiponcentos8-pipinstallationforpython3" id="howtoinstallpiponcentos8-pipinstallationforpython3"></a>

The most recent, reliable, and continuously maintained version of Python is Python 3. Python 3 is advised if you don't really need Python 2 for backward compatibility with older programmes.<br>

**Step 1: U**pdating the system repositories

Open a terminal window, and then type the following command to update the system repositories:

```
sudo yum update
```

This will update the local list of software packages. Updates may take a while to install if yum update hasn't been executed recently.

#### **Step 2: Installing Python 3** <a href="#howtoinstallpiponcentos8-step2-installingpython3" id="howtoinstallpiponcentos8-step2-installingpython3"></a>

Python 3 is a standard feature in several CentOS 8 updates. Skip this step if Python 3 is already installed on the system.

Open a terminal window and type the following command to install Python 3:

```
sudo yum install python3
```

![](https://customer.acecloudhosting.com/index.php?rp=/images/kb/1505_centos-1.png)

#### Step 3: pip Installation for Python 3 <a href="#howtoinstallpiponcentos8-step3-pipinstallationforpython3" id="howtoinstallpiponcentos8-step3-pipinstallationforpython3"></a>

For Pip installation for Python 3, open a terminal and type the following:

```
sudo yum install python3-pip
```

#### Step 4: Verify pip has been installed <a href="#howtoinstallpiponcentos8-step4-verifypiphasbeeninstalled" id="howtoinstallpiponcentos8-step4-verifypiphasbeeninstalled"></a>

Verifying an application's version number is one approach to see if it has been installed. Enter the following command to determine the Pip 3 version.

```
pip3 --version
```

![](https://customer.acecloudhosting.com/index.php?rp=/images/kb/1506_centos-2.png)

The pip3 version that is installed on your system is shown in the output.

#### **b. pip Installation for Python 2** <a href="#howtoinstallpiponcentos8-pipinstallationforpython2" id="howtoinstallpiponcentos8-pipinstallationforpython2"></a>

You may install different Python versions simultaneously with CentOS 8. Python 2 may be set up concurrently with Python 3 installations.

#### **Step 1: U**pdating the system repositories <a href="#howtoinstallpiponcentos8-step1-updatingthesystemrepositories.1" id="howtoinstallpiponcentos8-step1-updatingthesystemrepositories.1"></a>

Continue to the following step if you updated the repositories in the previous section.

Use the following command to update repositories:

```
sudo yum update
```

#### **Step 2: Installation of Pip 2** <a href="#howtoinstallpiponcentos8-step2-installationofpip2" id="howtoinstallpiponcentos8-step2-installationofpip2"></a>

For Pip 2 installation, open a terminal and type the following:

```
sudo yum install python2-pip
```

![](https://customer.acecloudhosting.com/index.php?rp=/images/kb/1508_centos-3.png)

#### **Step 3: Verify the installation** <a href="#howtoinstallpiponcentos8-step3-verifytheinstallation" id="howtoinstallpiponcentos8-step3-verifytheinstallation"></a>

To ensure that pip2 is installed on your Centos 8 system, check its version:

```
pip2 --version
```

![](https://customer.acecloudhosting.com/index.php?rp=/images/kb/1509_centos-4.png)

The pip2 version should be visible on the system.

### **Conclusion** <a href="#howtoinstallpiponcentos8-conclusion" id="howtoinstallpiponcentos8-conclusion"></a>

Your CentOS 8 system has Pip installed for Python 2 and Python 3. Pip may be used to conveniently manage the most well-liked Python packages.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.acecloud.ai/knowledge-base/tutorials/how-to-install-pip-on-centos-8.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
