hd.
hd.

Reputation: 18306

How to force pip to install last version of django?

There are have many versions of python on my ubuntu. I have set the default version for python command to 3.7 using alias. I have created a virtual env using virtualenvwrapper and want to install django on this virtual. After activating this virtual if I type python command, version 3.7 runs. But if I type 'pip install Django' the old version 1.13 which is related to python 2.7 is installed.

I have tried to use 'pip install Django==2.2.6' but no success. It says:

  DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support

How can I force pip to install version related to python 3.7?

Upvotes: 1

Views: 895

Answers (2)

Vishal
Vishal

Reputation: 33

You can try this:

 pip install django==type django version here which you want to insatll

Upvotes: 0

Zepman
Zepman

Reputation: 56

use pip3 install Django==2.2.6

You should have a look to pyenv for managing differents versions of Python on the same system

https://realpython.com/intro-to-pyenv/

Upvotes: 2

Related Questions