[Answer]-Python settings.py on windows

1👍

There is no /usr/bin/env python etc.. in the file so you are trying to run it using bash hence the syntax errors, you would need to use python settings.py to actually run a python file. Using chmod +x settings.py will make it exectuable but bash cannot tell that python should be used to run it without the shebang line.

I am not overly familiar with django but I don’t see how running settings.py is really useful it just contains the settings for the project. You would use either manage.py or django-admin.py from the command line.

Leave a comment