In this tutorial, we will see how to Upgrade PIP on Windows. We will cover how to upgrade, check the version, and also how to downgrade PIP to the previous version.
What does pip () do?
PIP is a package management system used to install and manage software packages/libraries written in Python. These files are stored in a large “online repository” termed as Python Package Index (PyPI). pip uses PyPI as the default source for packages and their dependencies. So whenever you type:
pip install package_name
pip will look for that package on PyPI and if found, it will download and install the package on your local system. Here, we will the focus on the following topics:
- Upgrade PIP on Windows
- Check the current version of PIP
- Downgrade PIP to previous version
Note: If your system is not recognising PIP, downloaded using this article PIP.
Upgrade PIP on Windows
In order to upgrade PIP on Windows, just open the Window’s Command Prompt and type the following command:
python -m pip install --upgrade pip
Note that this command will only work if you have already added Python to Window Path.
Upgrade and Managing Multiple Python Versions
If you want to update specific version of Python of your machine, You can follow the below steps:
Step 1: Type Command Prompt in Window’s search box
Step 2: Open the Command Prompt and you will see the following screen.
C:\Users\Shivang>
Step 3: Type “cd” in the Command Prompt to ensure that your starting point has only the drive name:
C:\Users\Shivang>cd\
Step 4: Now press Enter and you will see the following screen.
C:\>
Step 5: Locate your original Python Application path ( the folder in which you originally installed Python ).
C:\Users\Shivang\AppData\Local\Programs\Python\Python39
Step 6: After retrieving the original Python Application Path, type “cd” followed by your Python Application Path:
C:\>cd C:\Users\Shivang\AppData\Local\Programs\Python\Python39
Step 7: Press Enter and then type this following command in your Command Prompt window:
python -m pip install --upgrade pip
For example,
C:\Users\Shivang\AppData\Local\Programs\Python\Python39>python -m pip install ––upgrade pip
Step 8: You will notice that the latest PIP version is installed
Check the Version of PIP
To check the current version of PIP, just type/copy the following command in your Command Prompt:
pip --version
Downgrade PIP
In previous section, we have covered how to upgrade and check the version of PIP in Windows. But what if you like to revert back to a previous version of PIP? You can easily downgrade your Window’s PIP version to it’s previous version. How ? let’s see,
To downgrade the PIP version just type the following command:
python -m pip install pip==version_name
Suppose you wanted to downgrade your PIP version to 18.1 then,
python -m pip install pip==18.1
You will see the version of PIP that you wanted to install is installed.
Successfully installed pip-18.1