[mod_python] mod_python ignoring --with-python?

Barry Warsaw barry at python.org
Fri Dec 5 10:59:53 EST 2003


I have a very strange problem which I don't quite understand.  I'm on a
RH9 system, with an Apache 2.0.48 built in a non-standard location, and
a Python 2.3.2 built in a non-standard location.  So when I configure
mod_python 3.0.4, I use --with-apxs to point at my non-standard Apache's
bin/apxs, and --with-python to point at my non-standard python
executable.  make ; make install and everything appears to go in the
right places.

Now I start up Apache doing something like:

% cd non/standard/location
% sudo bin/httpd -DONE_PROCESS

However, it appears as if mod_python is still using the first Python on
my $PATH instead of the one I used to configure --with-python.  I can
tell this because 1) if mod_python isn't installed in my $PATH Python,
Apache will throw a server error saying it couldn't import
mod_python.apache; 2) if I strace httpd I can see it's trying to do tons
of imports from /usr/local (where my $PATH Python is installed).

So either I misunderstand how --with-python is supposed to work, or this
is a bug, or it's a missing feature. ;).  Shouldn't mod_python honor
--with-python and ignore $PATH python?

Thanks for any light you can shed.  Let me know if you need more
information.
-Barry




More information about the Mod_python mailing list