How to upgrade PIP in python
We use the PIP command in our command prompt to install any package. PIP is used to install published Python packages in the PyPI (Python package index) or other indices. Generally, it installs packages that are not already installed via standard Python distribution.
Upgrading or updating PIP to its latest version is as simple as installing packages. This article will discuss upgrading and downgrading PIP in Windows, MAC, and Linux operating systems.
In WINDOWS:
Steps to update the PIP version in Windows:
1. Open the command prompt from the search menu.

2. Check your current PIP version by using the command:
pip –version
3. Type the command:
Python –m pip install –upgrade pip
4. It will display a successful message.
5. You can check the version again to see the update.
Note: If you get an error that says:
> ‘pip’ is not recognized as an internal
> or external command, operable program, or batch file
You need to add Python into the path first before updating PIP. It occurs because the OS cannot find Python in the path.
- If you want to either update or downgrade your PIP to a specific version, then you need to specify the version:
> Python –m pi install pip==version number
In Anaconda:
If we need to upgrade pip using the conda package manager in the Conda environment, then we can do that either by using the anaconda prompt or the anaconda navigator.
- By using the anaconda prompt:
- Open Anaconda Prompt. You can find it by searching the anaconda prompt in the search menu.
- Enter the command:
conda update pip
- By using the Anaconda navigator:
1. Open the anaconda navigator by searching in the search menu.
2. In the list of Python packages, find pip either by scrolling or by searching for pip.

3. Click on the green checkbox, and in the options displayed, click "mark for update". The green box turns sky-blue.
4. Click Apply on the right-bottom to upgrade pip.

In MAC OS:
1. Open Terminal
2. Check your current pip version to see if there is a newer version to update using the command:
$ pip --version
- If there is a newer version available to update, enter the command:
$ pip install --upgrade pip
Note: If you run into the "pip command not found" error, use the command:
$ Python –m pip install --upgrade pip
- If you want to upgrade or downgrade pip to a specific version, you need to mention the version in the command:
$ pip install --upgrade pip==version number
- All these commands work the same for pip3 too. You can also replace pip with pip3 if you want:
$ pip3 install --upgrade pip
$ ip3 install --upgrade pip==version number
In LINUX OS
1. Open Terminal
2. Check your current pip version to see if there is a newer version to update using the command:
$ pip --version
3. If there is a newer version available to update, enter the command:
$ pip install --U pip
Or
$ pip install --upgrade pip
Your pip gets updated to the latest version. You can check the version by using the above command to see the change.
If you get into any errors like permission issues, then use the following commands instead:
$ sudo –H pip3 install --upgrade pip (for pip3)
$ sudo –H pip2 install --upgrade pip (for pip2)
Sudo is the command that is used to access restricted files. For security purposes, you might be needed to type your password when you use sudo in a command.