Cannot import mod_python modules

Mark chromeclouds at yahoo.co.uk
Tue Apr 12 06:55:56 EDT 2005


Hi, I've just installed the Win32 build of mod_python 3.1.4 for Python
2.4 and have setup my Apache config file with the LoadModule and
PythonHandler directives and then copied "mod_python.so" to my Apache
modules directory.

I restarted Apache and decided to do a quick cgi.test() and it shows
that mod_python listed under server software section.

OK, next I tried mptest.py, but I get an Internal Server Error. The
traceback recorded in the error log says "No module named _apache"

mptest.py:

from mod_python import apache

def handler(req):
    req.write("Hello World!")
    return apache.OK

Why doesn't this work? or rather what have I missed?



More information about the Python-list mailing list