[mod_python] mod_python, python_handler error "Can't get/create interpreter"

Graham Dumpleton graham.dumpleton at gmail.com
Mon Apr 23 19:09:01 EDT 2007

On 24/04/07, Sean Glover <seanglover at sympatico.ca> wrote:
> [Mon Apr 23 18:52:47 2007] [error] make_obcallback: could not call init.\n
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.5/site-packages/mod_python/apache.py", line
> 937,in init
>     from mod_python import importer
>   File "/usr/local/lib/python2.5/site-packages/mod_python/importer.py", line
> 24, in <module>
>     from mod_python import publisher
>   File "/usr/local/lib/python2.5/site-packages/mod_python/publisher.py",
> line 50, in <module>
>     from cache import ModuleCache, NOT_INITIALIZED
>   File "/usr/local/lib/python2.5/site-packages/mod_python/cache.py", line
> 27, in <module>
>     import urllib2
>   File "/usr/local/lib/python2.5/urllib2.py", line 88, in <module>
>     import hashlib
>   File "/usr/local/lib/python2.5/hashlib.py", line 104, in <module>
>     md5 = __get_builtin_constructor('md5')
>   File "/usr/local/lib/python2.5/hashlib.py", line 31, in
> __get_builtin_constructor
>     import _md5
> ImportError: No module named _md5
> [Mon Apr 23 18:52:47 2007] [error] get_interpreter: no interpreter callback
> found.
> [Mon Apr 23 18:52:47 2007] [error] [client] python_handler:
> Can't get/create interpreter.

And there be the real problem. Either that version of Python hasn't
got the md5 module installed, or you are running PHP on the same
server and it is loading the mhash.so PHP module which has shown in
the past to conflict in bad ways with mod_python.

Thus, check if from command line Python you can import 'md5' module.
If that works, disable PHP on web server and see if problem goes away.
If it does, work out how to disable PHP mhash.so so it doesn't load.


More information about the Mod_python mailing list