[Pythonmac-SIG] Help with path settings

Piet van Oostrum piet at cs.uu.nl
Tue Jan 29 10:54:31 CET 2008


>>>>> George Wright <georgewr at bigpond.net.au> (GW) wrote:

>GW> I'm having trouble with PYTHONPATH ..
>GW> george-g5:~ georgewright$ env
>GW> TERM_PROGRAM=Apple_Terminal
>GW> ...
>GW> PYTHONDOCS=/Users/georgewright/Python_stuff/Python-Docs-2.4.2/
>GW> PATH=/usr/local/bin:/usr/local/sbin:/usr/local/:/usr/local/mysql/bin:/
>GW> opt/local/bin/:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/mysql/bin:/
>GW> opt/local/bin/:/usr/local/include/:/System/Library/Frameworks/
>GW> Python.framework/Versions/Current/bin/
>GW> ...
>GW> PYTHONPATH =/usr/local/Zope-3.3.0/lib/python

>GW> I want to change this to PYTHONPATH=''
>GW> I can't find where I set it to the current value. I know I set it  that way
>GW> some months ago so I could do zope things in interactive  python - but I
>GW> don't recall how!
>GW> I have changed .bash_profile to what I want and searched for .pth  files
>GW> that might help but to no avail.
>GW> I have changed .profile too

>GW> Also the PATH=... :/System/Library/Frameworks/Python.framework/
>GW> Versions/Current/bin/
>GW> points to a 2.3 installation and I want to change that to ... /
>GW> Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/
>GW> and I don't know how to do it. (I actually get python 2.4 when I  start it
>GW> in terminal!)

The reason you get 2.4 is most probable because the 2.4 installation has
python in /usr/local/bin which is first in your PATH.

>GW> Can anyone help me sort out this mess?

I guess you are running Tiger because your system Python is 2.3.

There are quite a lot of places where environment variables can be set.

E.g. ~/.profile ~/.bashrc ~/.login ~/.bash_profile, ~/.bash_login, ~/.cshrc
~/.tcshrc  
/etc/csh.cshrc /etc/csh.login /etc/profile /etc/bashrc
~/.MacOSX/environment.plist

Apparently Zope has added something. Systems like these tend to insert stuff
in the /etc files because these are system-wide.
-- 
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org


More information about the Pythonmac-SIG mailing list