On Nov 10, 11:15 pm, Christoph Haas <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to deploy a Pylons app via mod_wsgi (Apache). That works so far.
> But I want to use a virtualenv directory and can't find any documentation
> on it. I found something for workingenv but don't know how to "translate"
> that to virtualenv.
>
> http://code.google.com/p/modwsgi/wiki/VirtualEnvironmentssaid something
> about WSGIPythonHome but that can't be defined per virtual host. So I
> would have to use the very same virtualenv directory for all deployed
> applications (which is pretty absurd).

Did you read that document completely or did you just scan it and try
and cherry pick out of it what you thought may work?

The mod_wsgi document explains that WSGIPythonHome is for linking
mod_wsgi against virgin Python virtual environment so that site-
packages in system wide Python is ignored. As also described,
additional virtual environment directories are then applied to
embedded mode or daemon mode processes using WSGIPythonPath or python-
path option to WSGIDaemonProcess directive as appropriate. If running
multiple VirtualHosts in embedded mode, then use site.addsitedir()
instead as described. Otherwise, delegate each VirtualHost to its own
daemon process and use python-path option for that daemon process
group instead.

> I also 
> foundhttp://pypi.python.org/pypi/virtualenv#using-virtualenv-without-bin-p...
> but that just prints these lines into Apache's error.log:

The virtualenv document talks about 'activate_this.py' not 'activate'
in that section.

The mod_wsgi document also says not to use the activate_this.py script
included in virtualenv 1.3 anyway.

You might want to read both the mod_wsgi and virtualenv document
again, as well as reading other documentation on the mod_wsgi site if
you don't understand the difference between embedded mode and daemon
mode.

Graham

>
> ============================================================
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] mod_wsgi
> (pid=26216): Target WSGI script '/etc/apache2/screenshots.debian.net.wsgi'
> cannot be loaded as Python module.
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] mod_wsgi
> (pid=26216): Exception occurred processing WSGI
> script '/etc/apache2/screenshots.debian.net.wsgi'.
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21] Traceback (most
> recent call last):
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21]  
> File "/etc/apache2/screenshots.debian.net.wsgi", line 8, in <module>
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21]    
> execfile(activate_this, dict(__file__=activate_this))
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21]  
> File "/home/debshots/bin/activate", line 4
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21]      deactivate ()
> {
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21]                    
> ^
> [Mon Nov 10 13:12:23 2008] [error] [client 80.85.196.21]  SyntaxError:
> invalid syntax
> ============================================================
>
> Seems like it can't run virtualenv's 'activate' script like that. :(
>
> Any ideas?
>
> Kindly
>  Christoph
>
>  signature.asc
> < 1KViewDownload
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to