[mod_python] apache2 won't load mod_python

Graham Dumpleton grahamd at dscpl.com.au
Fri Mar 25 18:18:06 EST 2005


Good to hear. BTW, in one of my emails I mentioned about issues with
output of PyErr_Print() not being flushed to log promptly. Turns out
there is a FAQ entry about flushing issues.

http://www.modpython.org/FAQ/faqw.py?req=show&file=faq02.003.htp

It says that restarting of Apache will cause stderr to be flushed,
but don't understand why an explicit flush couldn't be done. Will
need to experiment. :-)

On 26/03/2005, at 3:39 AM, Dave Britton wrote:

> Graham,
> It turned out that there actually was another version of python that 
> had been installed without my knowledge that was interfering with 
> apache2 finding the right path. I would never have suspected or found 
> this without your clues. Once I removed it and rebuilt everything, my 
> upgrade to apache2 and mod_python 3 works.
>
> Thanks for helping me track this down! I really appreciate it.
>
> -Dave
> ----- Original Message ----- From: "Graham Dumpleton" 
> <grahamd at dscpl.com.au>
> To: "Dave Britton" <dave at davebritton.com>
> Cc: <nicolas at lehuen.com>; <mod_python at modpython.org>
> Sent: Tuesday, March 22, 2005 4:13 PM
> Subject: Re: [mod_python] apache2 won't load mod_python
>
>
>> How many versions of Python are installed on your system? You appear 
>> to
>> be trying to use the one in /usr/local, is that the one you actually
>> want? When you configured Apache, did you tell it to use a particular
>> version or simply use whatever it could find? Have you got PYTHONPATH
>> set manually in your environment or that of Apache?
>>
>> Anyway, this particular sort of problem is generally the result of 
>> issues
>> with there being multiple versions of Python on a system, or a missing
>> or incomplete install of the Python side of the mod_python system. Go
>> through each of the site-packages directories for each version of 
>> Python
>> you have and see which have a mod_python directory, when the files 
>> were
>> copied into the directory and try and work out which version of 
>> mod_python
>> the files may be for. If a mod_python installation is 3.X, it will 
>> have
>> psp.py in the Python mod_python package directory. Doing this may help
>> clarify for you what went where and what version Apache might be 
>> trying
>> to load.
>>
>> I wander whether the mod_python module when it is being loaded from
>> Apache should dump out to the Apache error log the contents of 
>> sys.path.
>> This may aid in debugging these sort of problems as right now it isn't
>> easily detectable where Apache may be looking. The startup message may
>> say which version of Python the Apache module was compiled against, 
>> but
>> this is not necessarily a true indication of where it is looking for
>> modules.
>>
>> BTW, also read:
>>
>>   http://www.modpython.org/FAQ/faqw.py?req=show&file=faq02.001.htp
>>
>> Also tell us what operating system you are using.
>>
>> Graham
>>



More information about the Mod_python mailing list