PIP is the most used package manager in Python, which manages various libraries such as “OpenCV”, “Pillow”, and modules, i.e., numpy, TensorFlow. PIP needs to be upgraded regularly to get the updated functionality of Python.
This tutorial will provide a detailed guide on how to upgrade pip in windows using the following content:
How to Upgrade PIP in Windows?
To upgrade “pip” in windows, you can use the upgrade command in the command prompt. The upgrade command for “pip” is shown below:
python -m pip install --upgrade pip
The below snippet shows that the “pip” has been upgraded from version “22.0.4” to “22.3.1”.
Note: if you don’t add Python to the windows path, the above pip command will not work. So you must read the following guide to add Python to the window path.
After the upgradation of “pip,” now check the version of the pip using the following command:
The below snippet shows that the “pip 22.3.1” version has been successfully installed in our system.
How to Downgrade PIP in Windows?
Similarly, to downgrade a pip version, we need to specify the specific version using the below-given command:
python -m pip install pip==22.0.4
The below snippet shows that the “Python pip” has been successfully downgraded to version “22.0.4”.
Example: Installing Module Using pip
To install the open-source module using pip, you can use the pip command and the package name. If you want a detailed guide on installing the module using pip, then you can check this tutorial.
For installing the panda’s module, you can use the following pip command in the cmd terminal:
pip install pandas
The below snippet shows the installation of the panda’s module:
To upgrade the pip or install the latest version of pip in windows the “python -m pip install –upgrade pip” command is used in Python. The pip command is used to install, uninstall, or upgrade different packages in Python. This guide demonstrated how to upgrade or downgrade the pip in Windows.