How to solve SyntaxError on autogenerated manage.py?

Solution 1:

Make sure which python version you connect the django with (Make sure to activate the virtual env if you are using any).

When you install django using just

pip install django 

then you have to run

python manage.py startapp <yourApp name>

else if you have used:

pip3 install django

then you have to run

python3 manage.py startapp <yourapp name>

Refer:
enter image description here

Solution 2:

You can try with python3 manage.py runserver. It works for me.

Solution 3:

You should activate your virtual environment. In terminal, source env/bin/activate. Depending on your shell, something like (env) should now be a part of the prompt.

And now runserver should work. No need to delete exc part!

Solution 4:

Just activate your virtual environment.