[mod_python] importing egg format libs installed on a custom path

Graham Carlyle graham.carlyle at maplecroft.net
Fri Sep 14 07:19:44 EDT 2007


On Fri, 2007-09-14 at 19:59 +1000, Graham Dumpleton wrote:
> >From command line Python, are you perhaps using 'workingenv' system of
> some variety? The activation step required for some of these may not
> be compatible with mod_python.

No just a plain python install to a custom location as I don't want to
use the distros version. So I set PYTHONHOME in the apachectl script so
that modpython uses the correct version (I obviously needed to compile
the apache module against this version of python as well). I did this
after reading https://issues.apache.org/jira/browse/MODPYTHON-225 and
that seems to work fine.

The only problem is with eggs installed on a path outside site-packages
that I'm pointing to with PythonPath. Seems I need to reference these
sort of eggs explicitly on PythonPath to make them importable from the
modpython handler. If the egg is installed in site-packages then it can
be imported with no problem and no need to add the egg to the
PythonPath.

Graham





More information about the Mod_python mailing list