python on Mac
Lou Pecora
pecoraREMOVE at THISanvil.nrl.navy.mil
Thu Apr 6 07:01:14 EDT 2006
In article <e11ou7$git$1 at daisy.noc.ucla.edu>,
James Stroud <jstroud at ucla.edu> wrote:
> Thomas Nelson wrote:
> > I just purchased a new macbook (os 10.4.6), and I'm trying to install
> > python 2.4 on it. I downloaded and ran the two installers recommended
> > at http://www.python.org/download/mac/. Now I have IDLE, which runs
> > 2.4.1, but typing "python" at a terminal still opens 2.3.5, because it
> > points to /usr/bin/python. Is there a way to run python 2.4 without
> > idle? If I want to do a unix style script, something like
> > #!/usr/bin/python
> > print "hello world"
> > what can I put on the first line that will cause python 2.4 to
> > interpret my code?
> >
> > Thanks a lot.
> > THN
> >
>
> The python in /usr/bin is a link (to a link). You can do this:
>
> sudo rm /usr/bin/python
> sudo ln -s \
> /System/Library/Frameworks/Python.framework/Versions/2.4/bin/python \
> /usr/bin/python
YIKES! Don't do that. Don't mess with Apple's python. Not
recommended. Check the MacPython FAQ and Wiki pages. Python 2.4 was
installed in /usr/local/bin. You should put that in your $PATH variable
Before /usr/bin. That will cause the new Python to be launched.
-- Lou Pecora (my views are my own) REMOVE THIS to email me.
More information about the Python-list
mailing list