11π
β
As an alternative to wimβs answer, if you canβt upgrade your Python version for whatever reason, you can install Django 1.11 which is still compatible with Python 2.7:
pip install 'django<2.0'
π€Daniel Roseman
3π
Make sure your Python version in the virtualenv is Python 3.4+.
Django 2.0 only supports Python 3.4+, and functools.lru_cache
is only available in 3.2+.
To check the Python version in your current virtualenv:
python --version
To create a new virtualenv with python 3:
python3 -m venv venv --prompt=myenv
π€wim
- [Django]-Use Django+Redis+Socket.io to build chat room, where to start?
- [Django]-Form loses ability to send POST requests after 2 ajax updates
- [Django]-What would be the best way to track Github account activity via their API?
0π
This error is because of wrong picking of pip and python version . You can solve it by adding below lines in the ~/.bash_profile
alias python='python3'
alias pip='pip3.6'
After that close the terminal and run the following command to install Django
pip install Django==2.0
π€Uahmed
- [Django]-Django admin β how to display thumbnail instead of path to file
- [Django]-Best way to incorporate external django app into a project and safely make local changes
- [Django]-Django admin β prevent objects being saved, and don't show the user confirmation message
0π
For latest version of Django, python 3 is required, thus try installing
pip install django==1.11
π€Vidip
Source:stackexchange.com