On 24-08-11 17:12, Jianbao Tao wrote:
Thank you, Reinout.
I don't know which version of python mod_wsgi uses.
Look in /etc/apache2/mods-enabled/wsgi.load (that's on ubuntu, your
mod_wsgi config file might be somewhere else. On one of my older servers
it contains:
LoadModule wsgi_module /usr/lib/apache2/modules/mod_wsgi.so-2.5
Which means it is a python2.5 mod_wsgi. In ubuntu's case, as it is in
/usr/lib, it means that it uses the system python2.5.
Your python dirs look like this:
/usr/local/bin/python
/usr/local/bin/python-32
/usr/local/bin/python2.7
That's all locally compiled by hand. There's no way I can tell you which
one of 'em is used by apache :-) But probably what you'd get when
calling "python2.7" if your wsgi config indicates it is for 2.7.
You got your wsgi script to print the environment
'PATH':
'/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.2/bin:/opt/local/bin:/opt/local/sbin:/Users/jianbao/shlib:/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin:/usr/X11/bin:/Users/jianbao/pylib:/usr/local/mysql/bin',
Wow! That's a lot of custom stuff in there, including multiple python
paths. To me, it looks like pure luck if it is able to find the correct
mysql in there :-)
But what I was looking for: virtualenv puts the bin directory of the
virtualenv in the path. I don't see anything that looks like a
virtualenv dir in there, unless it is the /Users/jianbao/pylib at the end.
I personally don't know how wsgi+virtualenv works together (I use
buildout normally). so you'll have to ask around for that.
Reinout
--
Reinout van Rees http://reinout.vanrees.org/
rein...@vanrees.org http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.