Are you still loading mod_python into the same Apache?

WSGIPythonHome is ignored if mod_python also being loaded as
mod_python is initialising Python and not mod_wsgi.

That or you didn't use --no-site-packages when creating virtual
environment referred to by WSGIPythonHome and also didn't do sys.path
reordering in WSGI script if didn't use configuration directives to
adding additional virtual environment path.

Explain whether you are using embedded mode or daemon mode.

Explain whether you actually created a Python virtual environment at
the location specified by WSGIPythonHome or whether you just blindly
copied the example without understanding what it did.

Explain which method you then used to tell your Python web application
where your actual virtual environment site-packages directory was
located.

Graham

On 6 October 2011 06:55, GuyBowden <[email protected]> wrote:
> Hi,
>
> I am just starting to move from mod_python to mod_wsgi and am also
> setting up virtualenvs for my projects (several running from one
> apache server)
>
> I set up a virgin virtual env to use as the base env - each site will
> then have it's own virtualenv
>
> I have put this into my httpd.conf file
>
> WSGIPythonHome /usr/local/pythonenv/BASELINE
>
> But it doesn't seem to have any effect - I am getting an django import
> error that's coming from my server wide python directory:
>
> [Wed Oct 05 21:41:41 2011] [error] [client 80.119.239.216]   File "/
> usr/local/lib/python2.5/site-packages/django/core/handlers/base.py",
> line 42, in load_middleware
> [Wed Oct 05 21:41:41 2011] [error] [client 80.119.239.216]     raise
> exceptions.ImproperlyConfigured, 'Error importing middleware %s: "%s"'
> % (mw_module, e)
> [Wed Oct 05 21:41:41 2011] [error] [client 80.119.239.216]
> ImproperlyConfigured: Error importing middleware
> django.middleware.csrf: "No module named csrf"
>
> This error is because I need to use Django1.3 on the site causing the
> error - I know that, but the file causing it is from my server wide
> python install - not from any virtualenv? I am expecting an import
> error because I've not even setup any versions of Django yet!
>
> Why might Apache / mod_wsgi be ignoring the PythonHome directive? how
> could I find out further? I don't get any errors on an apache
> restart..
>
> Thanks,
>
> Guy
>
> --
> You received this message because you are subscribed to the Google Groups 
> "modwsgi" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/modwsgi?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/modwsgi?hl=en.

Reply via email to