How to upgrade pip?
This article will explain how to upgrade pip on Linux operating systems and walk you through the process. You can find more articles on Linux here.
How to upgrade pip on Linux?
Upgrading pip on Linux is easy. Before we begin we need to find out which version of pip is running on the operating system. This step is important before upgrading, because we will do it again once the upgrade is complete and compare the output. This will help us verify that upgrading pip has been done successfully.
Open your terminal and type the below:
$ pip -V
The result will be the following:
$ pip -V
pip 9.0.1 from from /usr/lib/python3.9/site-packages/pip (python 3.9)
We can now proceed with upgrading pip using the following command:
$ pip install --upgrade pip
The upgrade process will begin by installing some files, and once the installation is complete. You will receiving the following message:
$ pip install --upgrade pip
Successfully installed pip-21.3.1
Keep in mind that the version number might differ for you depending on when you performed this upgrade. During this upgrade, the latest version was 21.3.1.
Now lets verify that we are running the upgraded version of pip, by typing the following command:
$ pip -V
The result will be the following:
$ pip -V
pip 21.3.1 from from /usr/lib/python3.9/site-packages/pip (python 3.9)
This means that we have upgraded from pip 9.0.1 to pip 21.3.1 successfully.
How to perform the upgrade on Linux virtual environment?
Upgrading pip on python virtualenv is very simple and straightforward. Open your terminal and activate the virtual environment. Once you are in the virtual environment, you can follow the steps above. Upgrading pip on virtualenv is the same as upgrading it on Linux.
Are you facing problems?
Why don't you follow my Facebook page and ask me a question?