Quoting from the link you posted: "The purpose of such Python virtual environments is to allow one to create multiple distinct Python environments for the same version of Python, but with different sets of Python modules and packages installed into the Python 'site-packages' directory."
This does not meet my requirements: I have different python versions. Actually, I have the system-wide python (2.6.5), which I *do not* want to use for mod_wsgi, and the python in my virtualenv (which I have bootrstrapped, version 2.7.2), which is the one that I want to use. So, my virtualenv has both, packages and python binary. The reason is that my python (web2py) application needs a specific version of python, which is not available system wide. So, how can I tell mod_wsgi to use the python binary in my virtualenv? Usually, just by setting the PATH to point to it (preceeding the path of the system wide python), all scripts starting with "#!/usr/bin/env python" would use the right python version, but this does not seem to work in case of mod_wsgi. Any ideas? Thanks, Daniel On Wednesday, August 1, 2012 5:30:07 PM UTC+2, Jonathan Lundell wrote: > > On 1 Aug 2012, at 8:13 AM, Daniel Gonzalez <[email protected]> wrote: > > I am deploying a web2py application, and I will be serving it with Apache > via mod_wsgi. I have the following WSGI directives in my virtual host > configuration: > > WSGIDaemonProcess web2py user=www-data group=www-data \ > display-name=%{GROUP} > WSGIProcessGroup web2py > WSGIScriptAlias / /var/www/web2py/wsgihandler.py > > > This is working, but it is taking the system wide python installation. As > a result, some packages are not found (since they are only present in my > virtualenv). I would like to tell this particular virtual host (or the > whole Apache, if there is no other way), to use the python installation in > my virtual environment (/home/myuser/.virtualenvs/python2.7.2/bin). > > Is it possible to configure this for Apache? Or better, just for my > virtual host? I would like to cause as little effect as possible to the > rest of the system (specifically, I do not want to modify the default > python version used system wide) > > > http://code.google.com/p/modwsgi/wiki/VirtualEnvironments > --

