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

Graham Carlyle graham.carlyle at maplecroft.net
Fri Sep 14 07:34:27 EDT 2007

On Fri, 2007-09-14 at 21:23 +1000, Graham Dumpleton wrote:
> > 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.
> Set PYTHONPATH in the envvars file as well. That way it will be
> present when Python first starts up and eggs will be activated
> properly (I think).

But then won't the eggs be available to all the modpython handlers? I
wanted to have independence between the libraries used by different
modpython handlers. So say I have an application that relies on version
X of a library and another app that uses version Y of the same library.
So each handler has a different PythonPath pointing to a different,
potentially conflicting set of python modules, with some of these served
by python eggs.


More information about the Mod_python mailing list