mod_python installation problem ..severity High

boney boney.dalwani at
Tue Nov 14 11:25:37 CET 2006

hello All,

I am totally unknown to python language..

i need to install mod_python to embed python interpreter with the
Apache server, in order to use Trac with Apache Web Server

i am using :

Python 2.4.3,
apache 2.0.50 for windows,
mod_python-3.2.10.win32-py2.4-apache2.0 (windows installer)

after installing the packages i added the following lines to the
httpd.conf file :

  LoadModule python_module modules/

in order to test mod_python installation i added to following line to
the httpd.conf file

  <Directory "C:/Program Files/Apache Group/Apache2/htdocs/test">
        AddHandler mod_python .py
        PythonHandler mptest
        PythonDebug On

 within the htdocs/test folder there is file with the
following contents

   from mod_python import apache

    def handler(req):
        req.content_type = 'text/plain'
        req.write("Hello World!")
        return apache.OK

On doing this and duly following the installation and testing
instructions at and then pointing the url as
http://localhost/test/, i get the following error on the
server log file:

[Tue Nov 14 15:17:47 2006] [error] make_obcallback: could not import
[Tue Nov 14 15:17:47 2006] [error] make_obcallback: Python path being
used "['C:\\\\Program Files\\\\Apache
Group\\\\Apache2\\\\bin\\\\', '.\\\\DLLs', '.\\\\lib',
'.\\\\lib\\\\plat-win', '.\\\\lib\\\\lib-tk', 'C:\\\\Program
Files\\\\Apache Group\\\\Apache2\\\\bin']".
[Tue Nov 14 15:17:47 2006] [error] python_handler: no interpreter
callback found.
[Tue Nov 14 15:17:47 2006] [error] [client] python_handler:
Can't get/create interpreter.

On one of the forum i got the following feedback regarding this error:-

This one seems to occur on all platforms with similar frequency, and is
usually related
to having python multiple versions on the same system.The solution is
to adjust that PATH apache uses so it finds the correct python version.

But i donot have multiple versions of python installed.

Can anybody give some insight to what can be the problem and hw to
reach to the solution ??

Thanks in Advance


More information about the Python-list mailing list