[mod_python] working fix [FAQ: 'import site' failed; use -v for traceback]

kevin douglas fitnah55 at hotmail.com
Mon Jun 9 23:38:36 EST 2003

as stated in the make_obcallback FAQ entry, this is a sys.path

the main problem (i believe) is that the path that is available at
runtime is not always the same as it was with the previous run of

with a linux distro that requires python as part of the base install
with a minimal install) - the python in /usr is going to supercede
the python in /usr/local even if the path properly includes /usr/lib
and site-packages/mod_python is pointed to properly

what you should do is axe all the python rpm's that you can
(python-base is required for libuser which is required for passwd)
and then take the file list from python-base and manually delete it
(/usr/lib/python2.2 and /usr/bin/python)

this will free up the proper /usr/local/lib/python2.2 to be first in
line in the path

what's confusing is that you link to /usr/local/bin/python2.2 explicitly
to compile mod_python, but it still ends up with /usr/lib/python2.2
as the primary lib source... and even if you get the paths added as the
other FAQ entry states - you're still going to be running the old
site.py from /usr/lib...

and to make matters even worse sometimes it randomly decides to work
even before you axe the default distro install..



More information about the Mod_python mailing list