Forums

syntax error on manage.py

Hi am new here -

Just deploying my first django app and cannot run manage.py as I keep getting a syntax error

SyntaxError: invalid syntax
13:29 ~/OP (master)$ ./manage.py makemigrations OP
  File "./manage.py", line 17
    ) from exc
         ^
SyntaxError: invalid syntax
13:29 ~/OP (master)$

You need to run your management commands with the same version of python you run your web app. Here you run python3 code with python2.