[mod_python] PYTHONPATH and mod_python

Graham Dumpleton grahamd at dscpl.com.au
Thu Dec 21 14:23:08 EST 2006


How much control do you have on the box. Can you get a .pth file
installed into the Python 2.5 site-packages directory which refers
to your local mod_python version, or is it a shared box so you can't
do that?

On 21/12/2006, at 10:57 PM, Soenke Ruempler - NorthClick wrote:

> Hi Martin,
>
> Martin Stoufer <mailto:MCStoufer at lbl.gov> wrote on Wednesday,  
> December 20,
> 2006 6:13 PM:
>
>> The simplest, and most evil, answer to this is after reboot
>> a different
>> version of python is being used that does not have the
>> mod_python module
>> installed in its site-packages tree. From your helpful traceback, it
>> looks like the installed mod_python lib in Apache is still
>> healthy and
>> being loaded properly.
>>
>> Was this the same version as your were running pre-reboot? If so,
>> something serious happened to the entire mod_python module.
>
> The python binaries are the same as before the reboot. But, maybe  
> worth a
> note, there is more than one binary:
>
> lrwxrwxrwx  1 root root       9 Nov 29 17:21 /usr/bin/python ->  
> python2.3*
> -rwxr-xr-x  1 root root 1855364 Nov 25  2004 /usr/bin/python1.5*
> lrwxrwxrwx  1 root root       9 Mar 11  2005 /usr/bin/python2 ->  
> python2.3*
> -rwxr-xr-x  1 root root 3206789 Nov 25  2004 /usr/bin/python2.0*
> -rwxr-xr-x  1 root root    6364 Nov 24  2004 /usr/bin/python2.3*
> -rwxr-xr-x  1 root root 4135506 Sep 22 18:04 /usr/bin/python2.5*
> -rwxr-xr-x  1 root root     178 Nov 24  2004 /usr/bin/python2.5- 
> config*
> lrwxrwxrwx  1 root root      16 Nov 29 17:21 /usr/bin/python-config ->
> python2.5-config*
>
> However, the config line für mod_python is:
>
> ./configure --with-python=/usr/bin/python2.5
> --with-apxs=/www/94219_27474/local/apache2/bin/apxs
> --prefix=/www/94219_27474/local/ --libdir=/www/94219_2747
>
> IMHO it must be something with the PYTHONPATH that isn't properly  
> put into
> Apache. I tried almost everything like
>
> # PYTHONPATH=... apachctl restart
> # env apachectl restart
> # export PYTHONPATH=...
>
> And northing seems to help ...
>
>
> -soenke
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python



More information about the Mod_python mailing list