In this tutorial, you will learn how to upgrade PIP.
You will also learn how to check the current version of PIP, as well as downgrade to a previous version of PIP if you really need to.
TLDR; How to Upgrade PIP
The most obvious way, if python
is mapped to the version you want pip to be upgraded on:
python -m pip install --upgrade pip
or if you are running python3
from the python3
command itself:
python3 -m pip install --upgrade pip
or if you are running python3
and want to upgrade pip3
:
python3 -m pip3 install --upgrade pip3
How to upgrade PIP on Windows
Upgrading PIP on Windows is as simple as doing the same on Linux or Mac, just instead of opening the Terminal
, you would rather open the Command Prompt
to issue your commands.
Once you have opened the Command Prompt
, type:
python.exe -m pip install --upgrade pip
Python will now upgrade PIP to the latest version
How to check the version of PIP
To check the version of PIP that you are running, you can open either the CommandPrompt (Windows) or the Terminal (Linux/Mac) and type:
pip --version
If you are running pip3
then you can type:
pip3 --version
How to download PIP to a previous version
Sometimes you may want to downgrade PIP to a previous version, this is easy to do with a single command:
python -m pip install pip==18.1
Once again, if you are running python3
binary, you would do the following instead:
python3 -m pip install pip==18.1
..and if you were trying to do this for pip3
, then you could do it as follows:
python3 -m pip3 install pip3==18.1