pip install Django on python3.6

davideghz picture davideghz · Jan 11, 2017 · Viewed 22.3k times · Source

If I run pip install Django I get

Requirement already satisfied: Django in /usr/local/lib/python2.7/dist-packages

I'd like to use python3.6 instead (which is already installed in /usr/bin/python3.6). What's the correct pip syntax to install the last version of Django on python 3.6?

Answer

Essex picture Essex · Jan 11, 2017

You have to install pip3 :

sudo apt-get install python3-pip

Then, you have to work with venv

pip3 -p python3.6 virtualenv name

And you have to write :

pip3 install Django

#or specific version
pip3 install Django==1.10.5