In this short tutorial, you will see the complete steps to update PIP on Windows from scratch.
These are the topics that will be reviewed
: Update PIP in Windows Check the PIP version Downgrade PIP to
- a previous version To
- PIP on
update
Windows
, you will need to open the Windows command prompt and then type/copy the following command:
python -m pip install -upgrade pip
Note that the above method would only work if you already added Python to the Windows path. Don’t worry if you don’t know what it means, as you’ll see the full steps to update PIP in the next section.
Steps to update PIP
in Windows (1) First, type Command Prompt in the Windows search box (2) Next, open the command prompt
and you will see the following screen with your username (to avoid permission issues, you can consider running the command prompt as an administrator): (3) At the command prompt,
Type “cd\” to make sure your starting point only has
the drive name: (
4) Press Enter, and you will see the drive name C:\ > (
5) Locate the path of the Python application, which is the folder where you originally installed Python.
You can find the path of the Python application
by following these steps
: Type “Python” in the Windows search bar Right-click on the Python application and then select “Open File Location”
- Right-click the Python
- shortcut again, and then select “Open File Location”
- Python application
Here’s an example of a
path: C:\Users\Ron\AppData\Local\Programs\
Python\Python39
(6) Once you have retrieved the Python application path, type
the following command at
the command prompt: “
cd” followed by the Python application path
For
our example
: (
7) Press Enter and you will see: (
8) To update PIP, type or copy this command and, then press Enter
: python -m pip install -upgrade pip
Here’s what the command would look like at the command prompt
:
(9) You will notice that the latest version of PIP would be installed:
Steps to check the PIP version in
Windows To check the PIP version at
any time, you will need to use the Python Scripts path, instead of the Python application path.
(1) First, type “cd\” to make sure your starting point only has the drive name:
(2) Then, locate your Python Scripts path. The Scripts folder must be located within the Python application path.
For our example, the Python Scripts path is: C:\Users\Ron\AppData\Local\Programs\Python\
Python39\
Scripts (
3) Type “cd” followed by the Python Scripts path (then press Enter): (4) Finally, type the
following command to check
the PIP version: pip -version
For our example
:
(5) Press Enter and you will see the PIP version:
Now, what if you want to go back
to a previous version of PIP?
You can easily switch to an older version of PIP by following the steps below
.
Steps to downgrade PIP to a previous version
(1) Return to the Python application path. If it is currently set to the Python Scripts path, you can simply type “cd..” (
and then press Enter) and you will return to the Python application path: (2) Let’s say you want to downgrade the PIP version to 18.1
To do that, simply type the following command and then press Enter
: python -m pip install pip==
18.1 (
3) You should now see the PIP version you specified:
Final Words
If you are using Anaconda,
you may want to check out this tutorial that explains how to update PIP in Anaconda
.
Finally, if you need to install PIP, you can review the pip documentation.