[mod_python] Apache 2.2.2 not working

Christoph Mewes sanji at klassenfeind.org
Wed Oct 18 19:34:34 EDT 2006

I have the directory


Python shows what you expected ("ImportError: No module named
_apache"). The path list reads as follows:

['', 'E:\\Software\\Python-2.4.1\\python24.zip', 'E:\\Software\\Python-2.4.1', '
E:\\Software\\Python-2.4.1\\DLLs', 'E:\\Software\\Python-2.4.1\\lib', 'E:\\Softw
are\\Python-2.4.1\\lib\\plat-win', 'E:\\Software\\Python-2.4.1\\lib\\lib-tk', 'E

Apache reported the "path used":

['E:\\\\Software\\\\Python-2.4.1\\\\python24.zip', '.\\\\DLLs',
'.\\\\lib', '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',


(This time I used "Rely to all" in Google Mail)

2006/10/19, Graham Dumpleton <grahamd at dscpl.com.au>:
> Please use REPLY-ALL and keep followups on the mailing list.
> Christoph Mewes wrote ..
> > I have XP Home, so I cannot really change user rights.
> > My installation works perfectly, I can run Python scrits both from the
> > interactive mode and via .py-files (outputting to the cmd).
> >
> > 2006/10/19, Graham Dumpleton <grahamd at dscpl.com.au>:
> > > Apache on Win32 generally runs as a special user. That user must have
> > > access rights to the Python installation. Go through each of the directories
> > > listed in the log output and make sure it is where the Python bits are
> > > installed and then check the access rights to make sure the user Apache
> > > runs on can read the files located there. If the files aren't even in
> > those
> > > locations, then your Python installation is stuffed up. Can you run normal
> > > Python scripts outside of Apache?
> Do any of the directories listed in the path output in the log
> file contain a subdirectory called 'mod_python'?
> If you run Python and do:
>   from mod_python import psp
> what does it output?
> You want it to say:
>   ImportError: No module named _apache
> If it complains that it can't even find 'mod_python' module,
> then the mod_python installation is wrong.
> Also run within Python:
>   import sys
>   print sys.path
> is the path the same as that in the Apache log file?
> Graham

More information about the Mod_python mailing list