[mod_python] error: could not import mod_python.apache

Mike Looijmans nlv11281 at natlab.research.philips.com
Thu Apr 20 07:06:47 EDT 2006

It may be a good idea to stop your apache server, re-install mod_python 
and then restart apache. The install fails when Apache runs during the 
install, but the install isn't too clear about that, as I recall.

Apache on windows will run by default using the local "SYSTEM" account. 
This account has access to just about everything on your local machine, 
but has no rights whatsover to access any network resource, even if you 
explicitly grant it access to some networked dirs. So your modules, 
python, and your scripts must be located on the local machine's drive(s).

Mike Looijmans
Philips Natlab / Topic Automation

e.deventer at boer.nl wrote:
> "Graham Dumpleton" <grahamd at dscpl.com.au> wrote on 20-04-2006 08:46:47:
>  > More often than not it is the permissions problem, so don't give
>  > up on pursuing that totally just yet.
> I understand, but I don't know what else I can do..
>  > Some other questions, do you have more than one version of
>  > Python installed on your system?
> I have only one version installed.
>  > If you run Python from the command line and enter:
>  >
>  >   from mod_python import psp
>  >
>  > what error do you get? And yes this will error, what the error message
>  > is is important, so make sure you quote it exactly in followup.
> This is the error that I get:
> Traceback (most recent call last):
>   File "<pyshell#0>", line 1, in -toplevel-
>     from mod_python import psp
>   File "C:\Python\Python24\Lib\site-packages\mod_python\psp.py", line 
> 20, in -toplevel-
>     import apache, Session, util, _psp
>   File "C:\Python\Python24\Lib\site-packages\mod_python\apache.py", line 
> 28, in -toplevel-
>     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