problem with mod_python

Graham Dumpleton Graham.Dumpleton at
Sun Feb 17 11:07:30 CET 2008

On Feb 17, 3:29 pm, Pradnyesh Sawant <spra... at> wrote:
> Hello,
> I have a small program which does 'import hashlib'. This program runs fine
> with python2.5. But when I try running the same program through mod_python,
> I get the error: 'ImportError: No module named hashlib' in the apache2
> error.log
> Searching online suggested me to include or in apache2.
> but I don't see that in a package for debian lenny (the system I'm using).
> So, my Q is, is it possible to make mod_python use the same PYTHONPATH as
> the python2.5 interpreter? if so, how?
> any other suggestions to solve the above problem are welcome too.
> thanks!

Your mod_python isn't compiled against Python 2.5 but is using an
older version. You will need to rebuild mod_python to use Python 2.5
instead. You cannot just point mod_python at the Python 2.5 module
directories as they are incompatible.


More information about the Python-list mailing list