How to Upgrade PIP

Posted by
How to Upgrade PIP

PIP is a package manager for Python. It is a tool that helps you manage distribution packages in Python which are not part of the Python Standard Library. If you use Python to code that you would be using pip to install packages and here is how to Upgrade PIP from time to time. 

How to Upgrade PIP on Mac OS

Mac OS X latest comes with Python version 2.7, but not with pip (package manager). You can install and upgrade the PIP through the terminal. 

Installation 

1. Install the command line tools if not installed. 

$ xcode-select --install

2. Install PIP and check the current version. 

$ sudo easy_install pip

Upgrade

1. Check the current version of PIP. 

$ pip --version

2. Upgrade PIP. 

$ sudo pip install --upgrade pip

How to Upgrade PIP on Linux

Ubuntu 18 comes with Python 3, as the default Python installation. You can install and upgrade the PIP through the terminal. 

Installation

1. Install PIP

$ sudo apt install python3-pip

Upgrade

1. Check the current version of PIP. 

$ pip3 --version

2. Upgrade PIP. 

$ pip3 install --upgrade pip

How to Upgrade PIP on Windows

To upgrade PIP in Windows, you’ll need to open the Windows Command Prompt, and then type the command below.

Installation

1. Download PIP get-pip.py.

2. Open Windows Command Prompt. 

3. Navigate to the location of the get-pip.py file and type the below command to install PIP on Windows. 

python get-pip.py

4. You can directly install a specific version if you know the PIP version.

python -m pip install pip==20.2.4

Upgrade

1. Check the current version of PIP. 

python -m pip --version

2. Install PIP. 

python -m pip install --upgrade pip