Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install Django on python3.6

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?

like image 744
davideghz Avatar asked Jan 11 '17 10:01

davideghz


People also ask

Can I PIP install Django?

Django can be installed easily using pip . In the command prompt, execute the following command: pip install django . This will download and install Django. After the installation has completed, you can verify your Django installation by executing django-admin --version in the command prompt.

Does Python 3.7 support Django?

Python compatibilityDjango 3.0 supports Python 3.6, 3.7, 3.8, and 3.9 (as of 3.0. 11). We highly recommend and only officially support the latest release of each series.

Does Django work with Python 3?

Django 1.5 is the first version of Django to support Python 3. The same code runs both on Python 2 (≥ 2.6. 5) and Python 3 (≥ 3.2), thanks to the six compatibility layer.

Does Python 3.9 support Django?

Python compatibilityDjango 4.0 supports Python 3.8, 3.9, and 3.10. We highly recommend and only officially support the latest release of each series.


1 Answers

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
like image 114
Essex Avatar answered Oct 17 '22 08:10

Essex