Could not import settings 'myproject.settings' (Is it on sys.path?): No module named pinax

In your terminal, cd into the directory that contains settings.py, then run

python settings.py

You may get an import error that is easily fixed (typing error, or syntax error).


Have you tried to add that folder to your PYTHONPATH explicitly? Also, you may need to add both the project folder and the parent one. Add these lines to your wsgi file, using the path of your project:

sys.path.append('/explicit/path/to/myproject')
sys.path.append('/explicit/path/to')

P.S. do that before the application = WSGIHandler()line.

Update: the new error seems to have the same cause, according to this. Please double-check where your "voting_extras" app is, and whether or not its parent folder is present in the PYTHONPATH.


I think you need to add your stuff to the PYTHONPATH. I add my project and it's virtualenv. Here is a sample of what your wsgi could look like per project.

import sys
import site
import os

envpath = '/development/myproject/env/lib/python2.7/site-packages'

# we add currently directory to path and change to it
pwd = os.path.dirname(os.path.abspath(__file__))
os.chdir(pwd)
sys.path = [pwd] + sys.path

# Append paths
site.addsitedir(envpath)

# now start django
from django.core.handlers.wsgi import WSGIHandler
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
application = WSGIHandler()