Why is it that I have to run python manage.py somecommand and others simply run manage.py somecommand? I’m on OSX 10.6. Is this because there is a pre-set way to enable .py files to automatically run as Python scripts, and I’ve somehow disabled the functionality, or is that something that you explicitly enable?
Why is it that I have to run python manage.py somecommand and others simply
Share
If you are using a recent version of Django, the manage.py file should be an “executable” file by default.
Please note, you cannot just type
manage.py somecommandinto the terminal as manage.py is not on the PATH, you will have to type ./ before it to run it from the current directory, i.e../manage.py somecommand.If that does not work please be sure that the manage.py file has:
#!/usr/bin/env pythonas its first line. And make sure it is executable:
chmod +x manage.py