How To Install Pip on Linux

Updated on November 21, 2023
How To Install Pip on Linux header image

Pip is a tool for managing Python packages. Using a package manager allows for efficient management of your server. This tutorial explains how to install Pip on various Linux distros.

Ubuntu

This applies to Ubuntu versions:

  • Ubuntu 20.04
  • Ubuntu 19.10
  • Ubuntu 18.04
  • Ubuntu 16.04
  • Ubuntu 14.04

1. Update repository list

Update your repository list to make sure the installation will complete successfully:

# apt-get update

2. Install Pip

After you have updated the repository list, you can install Pip using apt-get:

# apt-get install python-pip

3. Confirm installation

Now confirm Pip has been installed successfully by executing pip -v on the command line. If you see a version printed on the screen, the installation was successful.

CentOS

1. Update repository list

Update your repository list with yum:

yum update

2. Install Pip

We can now install Pip:

yum -y install python-pip

3. Confirm installation

Check your version by executing pip -v. If this returns a version, Pip has successfully been installed.