Error: make_obcallback: could not import mod_python.apache

If you are getting the above error on Apache, I may have the solution for you!

This is a path issue, and in my case I am on a Windows Machine, all I needed to do to fix this problem was to add an Environment Variable (under System Variables, not User Variables) as follows:

Variable Name: PYTHONHOME
Variable Value: C:\path\to\your\python\install

For me that solved the problem straight away, AFTER an apache restart off course! 🙂

Hope this helps someone out there!

One Response to “Error: make_obcallback: could not import mod_python.apache”

  1. Cristian Navalici Says:

    Another possible solution (after hours of searching):

    http://www.modpython.org/FAQ/faqw.py?query=restarted&req=search says
    In most cases this message means that Apache server has started mod_python and the Python interpreter successfully, but mod_python couldn’t locate the mod_python package.

    So, check the mod_python folder for permissions (linux apply).
    e.g. /usr/lib/python2.5/site-packages/mod_python

    chmod 777 mod_python
    chmod 666 mod_python/*

    This will make files available also to apache user (or the user under webserver runs).


Leave a comment