I'm having the same problem, Python 3.4 and Django 1.9:
ImportError: No module named 'charlesvogl.settings'
I've gone through all the troubleshooting tips I can find in the forums and the document on debugging sys path (https://help.pythonanywhere.com/pages/DebuggingImportError/), no success.
My wsgi file is below:
import os
import sys
path = '/home/bjorncooley/charlesvogl_sandbox'
if path not in sys.path:
sys.path.append(path)
os.environ['DJANGO_SETTINGS_MODULE'] = 'charlesvogl.settings'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
My file structure conforms to structure of the WSGI file:
'/home/bjorncooley/charlesvogl_sandbox' is the project directory, and 'charlesvogl' is the primary app directory that contains settings.py. So, path to settings is:
'/home/bjorncooley/charlesvogl_sandbox/charlesvogl/settings.py'
I can run the wsgi.py file successfully from command line
When I run the wsgi file from command line, I can import the settings file without any issues. Steps below:
workon charles_sandbox2
python -i /var/www/sandbox_charlesvogl_com_wsgi.py
import charlesvogl.settings
No errors thrown.
Running the settings file from the command line throws an error about performing relative imports, but I get the same error running the settings file from command line for other apps I have on PA that are successfully deployed, so that doesn't seem to be helpful.
Any thoughts would be greatly appreciated!