How to solve SyntaxError on autogenerated manage.py?

前端 未结 30 2243
囚心锁ツ
囚心锁ツ 2020-11-28 08:24

I\'m following the Django tutorial https://docs.djangoproject.com/es/1.10/intro/tutorial01/

I\'ve created a \"mysite\" dummy project (my very first one) and try to

30条回答
  •  广开言路
    2020-11-28 08:47

    I solved same situation.

    INSTALLED VERSION

    python 3.6, django 2.1

    SITUATION

    I installed Node.js in Windows 10. After python manage.py runserver caused error.

    ERROR

    File "manage.py", line 14
    ) from exc
    ^
    SyntaxError: invalid syntax
    

    REASON

    My python path changed to python-2.7 from python-3.6. (3.6 is correct in my PC.)

    SOLUTION

    Fix python path.

提交回复
热议问题