Unable to install Django Version 1.11.22 with python 2.7 installed on windows 10

563 Views Asked by At

I have python 2.7 installed on my machine globally and the pip version is pip 20.3.4. I want to install Django version 1.11.22. When I am trying to do so with pip install Django==1.11.22, I am getting the error as mentioned in the picture. This is not just while installing Django, I am getting the same error while installing anything like pip install openpyxl.

enter image description here

2

There are 2 best solutions below

0
phd On BEST ANSWER

The latest version Python 2.7.18 should work fine. Install it with pip enabled or install pip after using python -m ensurepip. Upgrade pip:

pip install --upgrade "pip<21.0" "setuptools<45"

Install virtualenv:

pip install --upgrade "virtualenv<20"

Create a virtual environment (very much recommended) somewhere and activate it:

virtualenv django-venv
django-venv\Scripts\activate.

Install Django (can be done without a virtual environment):

pip install --upgrade "Django==1.11.22".

Remember to activate the virtual environment (if you use it) every time you open a new terminal.

0
Bernardo Olisan On

enter image description here As the error says and @Willem Van Onsem said, python 2.7 is no longer support, you can't install it nowadays