[Pythonmac-SIG] Lost among multiple Python version on my mac
David Worrall
vip at avatar.com.au
Mon Nov 20 11:54:24 CET 2006
Hi Scott, I regularly use 3 different versions of python. here's how.
for command-line work:
/usr/bin/python is the OS version
/usr/local/bin/python is my next choice
I have both of these in the shell's $PYTHONPATH variable
for (non-command-line) MacPythons, ie through IDLE etc, notice that
/System/Library/Frameworks/Python.framework/Versions/Current is a
symbolic link to a specific framework version of python
you can put other versions in the /System/Library/Frameworks/
Python.framework/Versions/ directory
and then change the symbolic link (ln -s) of Current to whatever
version you want.
And/or add to (or make) the .MacOSX/environment.plist file in your
home directory:
to contain this:
CTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd";>
<plist version="1.0">
<dict>
<key>PYTHONPATH</key>
<string>/usr/bin/python</string>
</dict>
</plist>
and that will be picked up by the IDE you load.
... Change/add to at will.....
At least that's how I do it. There's probably someone on this list
who'll have a more sophisticated way, but quick&dirty gets the job
done! :-)
hope this helps,
David
On 20/11/2006, at 2:09 AM, Piet van Oostrum wrote:
>>>>>> Scott Harris <scottrharris at gmail.com> (SH) wrote:
>
>> SH> I've unintentionally set my /usr/bin/python to a new version
>> instead
>> SH> of the original version on OS X 10.4. Is it normally a link to
>> the
>> SH> python in /System/Library/Frameworks/Python.framework/?
>
> /usr/bin:
> wildcard python*
> lrwxr-xr-x 1 root wheel 9 Oct 20 2005 python -> python2.3
> lrwxr-xr-x 1 root wheel 72 Oct 20 2005 python2.3 -> ../../
> System/Library/Frameworks/Python.framework/Versions/2.3/bin/python
> lrwxr-xr-x 1 root wheel 10 Oct 20 2005 pythonw -> pythonw2.3
> -rwxr-xr-x 1 root wheel 13728 Mar 21 2005 pythonw2.3
>
>> SH> Also, what's the "best" way to deal with multiple versions on
>> Python
>> SH> on one mac? The binary downloads of 2.4 and 2.4 go in /Library/
>> SH> Frameworks, but the versions I build from source go into /usr/
>> local/.
>
> /Library/Frameworks is the way to go, and you can make symlinks from
> /usr/local/bin.
>
> To make from source:
>
>
> MACOSX_DEPLOYMENT_TARGET=10.4 ./configure --enable-framework
> make
> sudo make frameworkinstall
>
>
> --
> Piet van Oostrum <piet at cs.uu.nl>
> URL: http://www.cs.uu.nl/~piet [PGP 8DAE142BE17999C4]
> Private email: piet at vanoostrum.org
> _______________________________________________
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
>
_______________________________________
experimental polymedia: www.avatar.com.au
Sonic Communications Research Group,
University of Canberra: www.canberra.edu.au
More information about the Pythonmac-SIG
mailing list