[mod_python] could not import mod_python.apache.\n

Graham Dumpleton graham.dumpleton at gmail.com
Fri Mar 23 04:19:09 EST 2007


On 23/03/07, liecto <liecto at gmail.com> wrote:
> This is in my error.log on my apache.
> ---------------
> [Fri Mar 23 11:53:36 2007] [error] make_obcallback: could not import
> mod_python.apache.\n
> [Fri Mar 23 11:53:36 2007] [error] make_obcallback: Python path being
> used "['F:\\\\mylg\\\\apache-more\\\\local\\\\python\\\\python25.zip',
> '.\\\\DLLs', '.\\\\lib', '.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk',
> 'F:\\\\mylg\\\\apache-more\\\\local\\\\apache\\\\Apache2\\\\bin']".
> [Fri Mar 23 11:53:36 2007] [error] get_interpreter: no interpreter
> callback found.
> [Fri Mar 23 11:53:36 2007] [error] [client 127.0.0.1] python_handler:
> Can't get/create interpreter.
> -----------------------------------
> And when I visit it, it display on my brower.
>
> 500 Internal Server Error
>
> what should I do ?

Work out where the mod_python module got installed, usually the Python
site-packages directory. See if the directory (eg site-packages), is
listed in the path above in the errors. If not, fix your Windows
registry settings so Python looks there correctly. Ie., edit:

[HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.5\PythonPath]
@="<path to python>\\Lib;<path to python>\\DLLs;<path to
python>\\Lib\\lib-tk"

See:

http://www.modpython.org/pipermail/mod_python/2006-September/021979.html

for reference.

If you run up Python and at prompt run:

  import mod_python

if it doesn't find module you know the search path is still not correct.

Other possibilities are that you have Apache running as special user
and it doesn't have permissions to read where mod_python is installed.

Graham


More information about the Mod_python mailing list