2009/7/1 Adam Yee <[email protected]>:
>
> My Turbogears 1.1 install is in a virtualenv.  I'm trying to host my
> app but I'm getting a ton of import errors / no module named...  More
> specifically with peak/peak.rules and config.  Is there a proper way
> to serving a Tg app (or any kind) that was created in a Python
> virtualenv?
>
> Since creating the app and testing with CherryPy's development server,
> it seems CherryPy does a lot of stuff behind the scenes which could be
> harder to duplicate in mod_wsgi.

This is more likely to be because your Python module search path
hasn't been set up properly for Apache/mod_wsgi. It wouldn't be
because CherryPy is doing anything special, but can be because you are
using PYTHONPATH in your user environment when executing CherryPy WSGI
server by hand, and not duplicating that PYTHONPATH setup properly in
Apache/mod_wsgi setup, or in the code in the WSGI script file used.

Another issue that can cause it is due to Apache/mod_wsgi normally not
running as you, but as special Apache user. Thus you may not have the
right directory/file permissions on your virtual environment such that
Apache/mod_wsgi and the Python interpreter it runs can actually read
the contents.

In summary, it is going to be a configuration issue of permissions problem.

That all said, ensure you have actually read the mod_wsgi
documentation which talks about virtual environments to make sure you
are even using the right mechanism for pointing at a virtual
environment.

Graham

--~--~---------~--~----~------------~-------~--~----~
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