How to downgrade the installed version of 'pip' on windows?


Python Problem Overview

On a windows 7 machine I have pip version 1.5.6 installed:

pip 1.5.6 from C:\Users\dietz\PNC\tas\ENV\lib\site-packages (python 2.7)

In order to find the reason for an error I want to install a different version of pip, which worked fine for me. So how can I uninstall pip and install version 1.2.1 instead?

Python Solutions

Solution 1 - Python

pip itself is just a normal python package. Thus you can install pip with pip.

Of cource, you don't want to affect the system's pip, install it inside a virtualenv.

pip install pip==1.2.1

Solution 2 - Python

If downgrading from pip version 10 because of PyCharm or other python errors:

python -m pip install pip==9.0.1

Solution 3 - Python

If you want to upgrade or downgrade to different version of pip, better use --upgrade option at one go instead doing it in two steps. i.e. first uninstalling the existing and then re-installing to new version, below does both in one go as shown below.

USE: Executed on WIN10 with Bash

> python -m pip install --upgrade pip==19.2.3

$ python -m pip install --upgrade pip==19.2.3
Collecting pip==19.2.3
  Using cached pip-19.2.3-py2.py3-none-any.whl (1.4 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
Successfully installed pip-19.2.3

Solution 4 - Python

well the only thing that will work is

python -m pip install pip==

you can and should run it under IDE terminal (mine was pycharm)

Solution 5 - Python

If you have to downgrade pip version do following steps: step1. pip uninstall pip step2. pip install pip==version number you want to install or downgrade step3. check version of pip using pip --version

This process also works when any other package giving error exit code(2) you can follow these steps and install your package.


All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionAlexView Question on Stackoverflow
Solution 1 - PythonLeonardo.ZView Answer on Stackoverflow
Solution 2 - PythonMaziyar MkView Answer on Stackoverflow
Solution 3 - PythonAbdul Rahiman MlrView Answer on Stackoverflow
Solution 4 - PythonTechMaster2015View Answer on Stackoverflow
Solution 5 - PythonShilpa Jayant PatilView Answer on Stackoverflow