Many times when you try to install a new python package, you will get a prompt asking you to upgrade PIP.
You might get a yellow prompt message saying:
You are using pip version 10.0.1, however version 19.0.1 is available.
You should consider upgrading via the ‘python -m pip install –upgrade pip’ command.
In this quick tutorial, we are going to show you the steps to upgrade PIP in Windows from the beginning.
We will assume that you have the Python package manager called PIP already installed, if you do not, we have a guide to help you with that.
We will cover:
- Checking your PIP version
- Easy method to upgrade PIP
- Downgrade PIP to another version
- Install a specific version of PIP
First, assuming you are using Windows 10, we must need to open the Command Prompt by typing the Windows Key (⊞
) + X, then click Command Prompt (Admin). Another option is to type Windows Key (⊞
), then typing ‘Command Prompt’ in the search box that appears. Then Right-Click on Command Prompt, and select ‘Run as administrator’ shown as:
Then a command prompt should appear like this:
Checking your PIP version
1. Find the location(s) of where python is installed with the convenient windows “where” command:
2. As shown, you might have two or more Python versions listed. Change directory to the Python version you wish to install, which will be shown on the screen from the output of the where command.
3. Finally, type in the command which checks your version of pip:
pip --version
Easy method to upgrade PIP
1. Now that we have established your PIP version, you can easily upgrade to the latest version. With the Administrator: Command Prompt still open from the previous step, and still in the Python installation location given from the “where python” command, we can now type in the easy upgrade command and push ENTER:
python -m pip install --upgrade pip
Note: This will upgrade to the latest version of PIP. If you wish to downgrade or upgrade to a specific version, please refer to the next steps in this guide.
Downgrade PIP to another version
1. If one of your packages results in an error, because your PIP version is too far advanced, then you can downgrade with PIP itself. With the Administrator: Command Prompt still open from the previous step, and still in the Python installation location given from the “where python” command, we downgrade with the following simple command and push ENTER:
python -m pip install pip==18.0
2. Make sure you check to see the “Successfully installed <pip version>” that you wish to see for the version you are trying to downgrade to.
Install a specific version of pip
1. Finally, the install an exact version of pip is the exact same as downgrading, but in this case, it would be an upgrade. With the Administrator: Command Prompt still open from the previous step, and still in the Python installation location given from the “where python” command, we downgrade with the following simple command and push ENTER:
python -m pip install pip==19.2.3
2. Make sure you see the final version that you wish to be installed on the last line with “Successfully installed <pip version>”
Recent Comments