[python] Django upgrading to 1.9 error "AppRegistryNotReady: Apps aren't loaded yet."

In my case, the error occurred when I made python manage.py makemigrations on Django 2.0.6.

The solution was to run python manage.py runserver and see the actual error (which was just a missing environment variable).