[Pythonmac-SIG] Lost among multiple Python version on my mac

Ronald Oussoren ronaldoussoren at mac.com
Mon Nov 20 11:59:35 CET 2006


David,

There is one problem with your solution: PYTHONPATH doesn't do what you seem to think it does. PYTHONPATH is a list of directories that are added to the python search path (aka sys.path). If you want multiple versions of python on your shell search path you should change PATH, not PYTHONPATH.

Ronald
 
On Monday, November 20, 2006, at 11:55AM, "David Worrall" <vip at avatar.com.au> wrote:
>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
>
>
>
>
>_______________________________________________
>Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
>http://mail.python.org/mailman/listinfo/pythonmac-sig
>
>


More information about the Pythonmac-SIG mailing list