[Pythonmac-SIG] Is this the correct way to have installed and to use Python 2.4
Chris Barker
Chris.Barker at noaa.gov
Mon May 23 07:21:19 CEST 2005
Bob Ippolito wrote:
> Change your PATH environment variable to put /usr/local/bin before /
> usr/bin or equivalent.
That's option A.
Option B. is to use "python2.4" when you want 2.4, either at the command
line, or in a script's #! line:
#!/usr/bin/env python2.4
I'm pretty sure Bob's 2.5 package installs a binary (or a link) called
python2.4 If it doesn't work, you may need to put /usr/local/bin on your
PATH.
I prefer this option because in unequivocally will run ONLY with 2.4,
and you've made it clear in your source that that is how it's been
tested. It's the ONLY way to go if you want to have multiple versions
installed,a nd be able to test against them easily. It also means that
when you install 2.5, all the scripts that use 2.4 will still work, and
indeed, any of the scripts you now have using 2.3 will still work.
I got into this habit when running RedHat Linux, which REQUIRED "python"
to be the one they had installed (1.5.6 for a LONG time). I don't' know
how Apple has used python, and I think OS-X is less likely to use a PATH
you've set for system scripts, but I still like this approach better.
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker at noaa.gov
More information about the Pythonmac-SIG
mailing list