[mod_python] Problems with PYTHONPATH.

Jack Diederich jack_diederich at email.com
Fri Oct 4 20:43:18 EST 2002


I had a similar problem when using a user specific python instead of the system wide python with mod_python.
I took the cowards way out and just issued a PythonPath directive in httpd.conf with all the paths I need.

-jack
----- Original Message -----
From: "Hr. Daniel Mikkelsen" <daniel at copyleft.no>
Date: Sat, 5 Oct 2002 01:23:48 +0200 (CEST) 
To: mod_python at modpython.org
Subject: [mod_python] Problems with PYTHONPATH.


> Hi.
> 
> I'm experiencing odd behaviour with mod_python and its PYTHONPATH. I'm running
> FreeBSD 4.5. I'm not using the port-version of mod_python, since I want use a
> separate threadless Python.
> 
> Anyway, I've compiled up things, and they basically work. I have my python
> version in /local/python-2.2.1-threadless. Mod_python, when ./configuring
> detects this from the --with-python=/local/src/Python-2.2.1 I give it.
> 
> All very automatic and nice.
> 
> But when I fire up Apache with this, things just refuse to work until I add a
> symlink from
> "/local/python-2.2.1-threadless/lib/python2.2/site-packages/mod_python" to
> "/usr/local/lib/python2.2/site-packages".
> 
> And when I make my test handler print out sys.path, what I get is the
> /usr/local prefixed ones, not the /local/python-2.2.1-threadless ones.
> 
> I can't figure out what's going on. The mod_python.so DSO only knows about
> /local/python-2.2.1-threadless.
> 
> I've worked around this with a PythonPath entry, but I'm very curious as to why
> this is happening. Is /usr/local some default prefix Python defaults to? Is
> mod_python.so loading /usr/local/lib/python2.2/config/libpython2.2.a somehow by
> mistake?
> 
> I'm absolutely certain there is only one installation of mod_python on my
> system, and that it's configured and compiled with the correct (threadless)
> interpreter.
> 
> Any help would be appreciated. :)
> 
> -- Daniel
> 
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 
> 

-- 
__________________________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


"Free price comparison tool gives you the best prices and cash back!"
http://www.bestbuyfinder.com/download.htm




More information about the Mod_python mailing list