Graham Dumpleton
graham.dumpleton at gmail.com
Thu Sep 13 18:28:50 EDT 2007
Have you confirmed that in your application sys.path includes the directory you expect to be there? What is the remainder of your Apache configuration for setting up mod_python handler? Ie., what context are you setting PythonHandler etc. Grahamd On 13/09/2007, Graham Carlyle <graham.carlyle at maplecroft.net> wrote: > Hi > > I'm trying to setup an application via mod_python and want to place some > required libraries, that are python eggs, on an application specific > path. > > So I use... > > <LocationMatch ...> > > ... > PythonPath "['/opt/apps/foo/lib/'] + sys.path" > PythonInterpreter foo > ... > > </LocationMatch> > > But the application doesn't pick up on the eggs that were installed in > "/opt/apps/foo/lib/". Although the python shell can import the libs > after setting PYTHONPATH to this path. > > However I can get the webapp to find the eggs if I add to the apache > conf... > > PythonImport /opt/apps/foo/lib/site.py foo > > site.py being a file the easy_install created when i installed the eggs > to the custom path. > > Is this the recommended way of installing eggs to a custom path? Are > there problems with this "solution". > > I had a trawl and couldn't find any info on this sort of problem in the > mailing list which surprised me. > > thanks, > Graham > > > _______________________________________________ > Mod_python mailing list > Mod_python at modpython.org > http://mailman.modpython.org/mailman/listinfo/mod_python >
|