According to the django 2.0 release notes, the Django 1.11.x series is the last to support Python 2.7 ( Check here )
So, you can use an older version of Django, and then install it with this command:
pip install 'Django<2'
but if you decide to create your project using Django> = 2.0, you should create a virtual environment using python 3.4 or higher:
sudo apt-get update sudo apt-get install python3 python3-pip sudo -H pip3 install virtualenv mkdir ~/myproject cd ~/myproject virtualenv -p `which python3` myprojectenv source ~/myproject/myprojectenv/bin/activate python -V
it should output something like this:
Python 3.XY
Now you can install the latest version of Django without errors:
pip install Django
Good luck
source share