Is it possible to stop Django from creating .pyc files, whilst in development? Is it possible to stop Django from creating .pyc files, whilst in development? linux linux

Is it possible to stop Django from creating .pyc files, whilst in development?


You can use this, where applicable:

import syssys.dont_write_bytecode = True


You can try setting the PYTHONDONTWRITEBYTECODE environment variable:

PYTHONDONTWRITEBYTECODE

If this is set, Python won’t try to write .pyc or .pyo files on the import of source modules.

New in version 2.6.


Very late reply but I got here after Googling. You can try this:

python -B manage.py [any other commands/options]

For example:

python -B manage.py sql yourapp

However, this doesn't work for some reason:

python -B manage.py runserver 0.0.0.0:5000