[mod_python] ImportError: No module named _apache

David Fraser davidf at sjsoft.com
Fri Oct 29 17:56:55 EDT 2004

Huzaifa Tapal wrote:

> I have followed all the steps outlined in your documentation for 
> mod_python 3.1.3 for apache 2.0. however, when executing the test 
> script I am running into a problem where I get the following error:
> Traceback (most recent call last):
> File “mptest.py”, line 1, in ?
> from mod_python import apache
> File 
> “/usr/local/python2.3.4/lib/python2.3/site-packages/mod_python/apache.py”, 
> line 28, in ?
> import _apache
> ImportError: No module named _apache
> After digging around a whole lot, I see that the _/apachemodule.c /is 
> getting compiled into the mod_python.so binary. I checked the 
> init_apache() method in _apachmodule.c and at one point if there is an 
> error compiling the _apache module into mod_python, it errors out 
> silently without any exceptions being raised.
> I am afraid that the _apache module might be erroring out and as a 
> result mod_python is not functioning.
> Can you please shed some light?
It would be great if you could say what platform you are using, and what 
the error compiling the _apache module into mod_python is ...


More information about the Mod_python mailing list