I'm trying to install Django v3.0.6 (or any other v3.x.y) in my macOS. Following are the steps that I've done:
- installed python3 using homebrew, then ran
sudo pip3 install virtualenv, - navigating into my target project folder, ran
virtualenv venv -p python3. - After activating it, ran
pip install Django==3.0.6. This resulted in a successful installation of Django 3.0.6.
However, when I run django-admin.py startproject myproject I immediately get the following error:
from: can't read /var/mail/django.utils.version
/usr/local/bin/django-admin.py: line 3: syntax error near unexpected token `('
/usr/local/bin/django-admin.py: line 3: `VERSION = (3, 0, 6, 'final', 0)'
Trying to to run this django-admin.py command using the virtualenv is actually my second attempt. I initially started trying with installing Django directly in my machine, not using virtualenv, which also resulted in the same error. My assumption is that happened because the default python version in my machine/OS is 2.7. Any help would be greatly appreciated!