I'm just getting started with CS50 Web's problem 1 (wiki). I've got the code and I'm trying to run the Django server for the first time to see what the source code gives me.
I have made no edits to the source code.
I am running python manage.py runserver
When I do this I get the error message
File "manage.py", line 16 ) from exc ^ SyntaxError: invalid syntax
Lines 7-17 of manage.py are:
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wiki.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. Are you sure it's installed and "
"available on your PYTHONPATH environment variable? Did you "
"forget to activate a virtual environment?"
) from exc
execute_from_command_line(sys.argv)
But, when I run python3 manage.py runserver
it works fine.
What is the syntax difference between the python versions that is causing the error?
python manage.py shell
give any problems?