The newly created Django project will run directly after entering
python manage.py runserver
The mistakes are as follows:
user@UserdeMacBook-Pro djangoProject % python manage.py runserver
File "manage.py", line 17
) from exc
^
SyntaxError: invalid syntax
I feel a little puzzled. Later, I found that there was a problem with the specification of the python version. I should specify the python 3 version
python3 manage.py runserver
That’s it.
Read More:
- Exception occurred when Django created app: from exc ^ syntaxerror: invalid syntax
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- Solution to syntaxerror: invalid syntax in PIP install XXX
- Syntaxerror: invalid syntax when executing PIP install XXX
- Python how does a. Py file call classes and functions in another. Py file
- Error syntax error: invalid syntax in PIP install XXX
- [Python] error syntax error: summary of solutions to invalid syntax
- [!] Invalid `Podfile` file: syntax error, unexpected end-of-input, expecting keyword_end.
- Syntax error: invalid syntax
- Error in PIP command execution – syntax error: invalid syntax
- Solve the syntax error of Python PIP installation sys.stderr.write (f“ERROR: {exc}“)
- Repo reports an error syntax error: invalid syntax
- Solve the problem of syntax error: invalid syntax in PIP install XXX
- Syntax error: invalid syntax before Python string
- Java 8 Stream – Read a file line by line
- The language of C__ FILE__ 、__ LINE__ And line
- Ubuntu has solved the error of h5py installation: building wheel for h5py( setup.py )… or error: failed building wheel for h5py
- Python: print syntax error: problem with invalid syntax error
- Why not manage controller in spring container
- Solution to command line option syntax error. Type command /? For help