Python: Install PIP – MacOS, Ubuntu, CentOS

What is PIP? pip is a tool for installing and managing Python packages.

As well as Python, pip can be install on various operation systems: Linux, Mac, Windows, etc.

In this post i am showing how to install pip on MacOS and how to install pip on Linux (Ubuntu and CentOS).

Python: Install PIP

To install the latest version of pip, run the below commands depending on your OS.

Install PIP on MacOS

Install pip on MacOS, using easy_install command and upgrade pip to the latest version:

$ sudo easy_install pip
$ sudo pip install --upgrade pip

Install PIP in Ubuntu

Install pip in Ubuntu, using apt-get package manager:

$ sudo apt-get update
$ sudo apt-get install python-pip
$ sudo pip install --upgrade pip

Install PIP in CentOS

Install pip in CentOS from EPEL repository, using yum package manager:

$ sudo yum update
$ sudo yum install epel-release
$ sudo yum install python-pip
# CentOS-7 and higher
$ sudo pip install --upgrade pip
# CentOS-6 (the last stable version of PIP that is compatible with Python 2.6)
$ sudo pip install pip==9.0.3