Pylons/pyramid — Issue #395: [docs] The wsgi script in the apache mod_wsgi tutorial
Author: bassio
Created: 2012-01-08 04:12:42+00:00
State: open

I successfully deployed on apache, mod_python.
http://docs.pylonsproject.org/projects/pyramid/en/1.0-branch/tutorials/modwsgi/index.html

but the wsgi script in the docs:
from pyramid.paster import get_app
application = get_app('/Users/chrism/modwsgi/env/myapp/production.ini', 'main')

failed to load the site,

so I had to prepend:

import site
site.addsitedir('/home/ahmed/dev/pyrenv/lib/python2.6/site-packages')

The addsitedir properly adds your site packages dir properly,
including following down all *.pth files etc.

After that it worked as expected. I am not sure if this is the case for everyone, but perhaps consider adding it to the tutorial.