[mod_python] mod_python + apache + winxp => could not import mod_python.apache

Graham Dumpleton grahamd at dscpl.com.au
Tue Apr 11 17:11:47 EDT 2006


One of the things I remember Nicolas sometimes suggesting is that
if Apache is run as service, make sure that the user the service
runs as actually has read abilities on directories where Python
site-packages are stored. But then, I have lost track of what the
original problem was so this may not be relevant.

BTW, is the mod_python you are using built from source by you or
is it the prebuilt version which was available. We have some new
logging stuff which would be useful to help in debugging this sort
of problem, but you would need to be able to build mod_python from
source code.

Graham

On 12/04/2006, at 12:58 AM, cyberco wrote:

> Hi Jim,
>  
> Thanks for your help so far.
>  
> On 4/10/06, Jim Gallacher < jpg at jgassociates.ca> wrote:
>> Hi Berco,
>>
>> I noticed that this message did not make it into the mod_python 
>> mailing
>> list. Per our prior conversation, it looks like you subscribed as
>> cyberco, but you are sending mail to the list as berco. I'm not a list
>> admin and I'm not sure how the list is moderated, but as Grisha, our
>> BDFL, is very busy it's possible that the message was simply dropped.
>>  That may even be the standard policy for mail from non-subscribed 
>> addresses. 
> Right, I accidently sent it from the wrong email address. I resent it 
> from the correct one.
>
>> Anyway, you might want to consider installing 3.2.8. There weren't any
>> really big changes from 3.2.5b that affected, but that was a beta 
>> after all. 
> The change made no difference
>
>> I'm still scratching my head over this one, and I suspects it's
>> something really simple we are both overlooking. 
> I have the same feeling, but I'm running out of options :)
>
>> Could you try a quick import test from the command line and email me 
>> the
>> output? Here is what I get:
>>
>> $ python
>> Python 2.3.5 (#2, Nov 20 2005, 16:40:39)
>> [GCC 4.0.3 20051111 (prerelease) (Debian 4.0.2-4)] on linux2
>> Type "help", "copyright", "credits" or "license" for more information.
>> >>> import mod_python.psp
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in ?
>>   File "/usr/lib/python2.3/site-packages/mod_python/psp.py", line 20, 
>> in ?
>>     import apache, Session, util, _psp
>>   File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line
>> 29, in ?
>>     import _apache
>> ImportError: No module named _apache
>> >>>
>>
>> The ImportError I get is the expected one as _apache refers to the
>> actual Apache loadable module, which of course is not available from 
>> the
>> command line interpreter. Any other ImportError indicates a different
>> problem.
>>
>> Jim 
> I get the same:
> ===========
> Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] 
> on win32
>
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import mod_python.psp
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "C:\Python24\Lib\site-packages\mod_python\psp.py", line 20, in ?
>
>     import apache, Session, util, _psp
>   File "C:\Python24\Lib\site-packages\mod_python\apache.py", line 28, 
> in ?
>
>     import _apache
> ImportError: No module named _apache
>
> _______________________________________________
> 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