Help with mod_python

Bengt Richter bokr at
Mon Sep 2 15:07:07 EDT 2002

On Sat, 31 Aug 2002 12:54:09 -0400, "Joseph Youssef" <leader730 at> wrote:

>Hello, I've been trying to get python to work on apache, so I downloaded
>mod_python, after I finished the setup process, I tried to test it just like
>they indicated with the same code they showed but everytime I to run any
>python file on the server, it always gives me this error:
>the file I ran here was called
>Mod_python error: "PythonHandler mptest"
>Traceback (most recent call last):
>  File "C:\PROGRAM FILES\PYTHON\lib\mod_python\", line 181, in
>    module = import_module(module_name, _req)
>  File "C:\PROGRAM FILES\PYTHON\lib\mod_python\", line 332, in
>    f, p, d = imp.find_module(parts[i], path)
>ImportError: No module named mptest
>I don't know how to fix it so if you know how then please help
Apache is probably running as a different user than you (e.g., maybe IUSR_XXX, where XXX is your
computer name), so probably you have to move to some directory (you may want to create
one in the tree it already knows about for web stuff) where apache can find it, or tell it where
to find stuff in your personal part of the disk (the latter is not a good idea security-wise).

There could be other problems, but that would be my first guess.

Bengt Richter

More information about the Python-list mailing list