Alex
Alex

Reputation: 44325

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

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?

Upvotes: 89

Views: 324616

Answers (5)

Abdul Rahiman Mlr
Abdul Rahiman Mlr

Reputation: 101

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

Upvotes: 10

Shilpa Jayant Patil
Shilpa Jayant Patil

Reputation: 21

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.

Upvotes: 0

TechMaster2015
TechMaster2015

Reputation: 11

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)

Upvotes: 0

Maziyar Mk
Maziyar Mk

Reputation: 1308

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

python -m pip install pip==9.0.1

Upvotes: 32

Leonardo.Z
Leonardo.Z

Reputation: 9791

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

Upvotes: 131

Related Questions