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

Jonathan Prater jonathan.prater at gmail.com
Sat Jan 24 23:12:02 EST 2009


Up until yesterday I was running Python 2.5 on Windows, and I was using 
mod_python to power a Django site.  Mostly to see if it was possible, I 
grabbed the SVN trunk of mod_python and compiled it against Python 2.6 
and Apache 2.2.  mod_python.so is now installed in 
<apachepath>\modules.  mod_python's Python files are in 
<pythonpath>\Lib\site_packages\mod_python.
I now have my Apache server running and have gone to my Django site.  I 
get a 500 Internal Server error, and the following shows up on my Apache 
error log:

[Sat Jan 24 22:55:35 2009] [error] make_obcallback: could not import 
mod_python.apache.\n
[Sat Jan 24 22:55:35 2009] [error] make_obcallback: Python path being 
used 
"['C:\\\\Python26\\\\lib\\\\site-packages\\\\setuptools-0.6c9-py2.6.egg', 
'C:\\\\Python26\\\\lib\\\\site-packages\\\\django-1.0.2_final-py2.6.egg', 
'C:\\\\WINDOWS\\\\system32\\\\python26.zip', 'C:\\\\Python26\\\\Lib', 
'C:\\\\Python26\\\\DLLs', 'C:\\\\Python26\\\\Lib\\\\lib-tk', 
'C:\\\\Python26\\\\Lib\\\\site-packages', 'C:\\\\Program Files\\\\Apache 
Software Foundation\\\\Apache2.2', 'C:\\\\Program Files\\\\Apache 
Software Foundation\\\\Apache2.2\\\\bin', 'C:\\\\Python26']".
[Sat Jan 24 22:55:35 2009] [error] get_interpreter: no interpreter 
callback found.
[Sat Jan 24 22:55:35 2009] [error] [client 127.0.0.1] python_handler: 
Can't get/create interpreter.

According to 
http://www.modpython.org/pipermail/mod_python/2007-March/023330.html, 
the fix for this is to add c:\python26\lib\site-packages to the 
PythonPath registry key, but I've done this and it hasn't fixed anything.
Any thoughts?  I really want to get mod_python working with Python 2.6...

Jon P.


More information about the Mod_python mailing list