[Pythonmac-SIG] path, xcode, and python

Charles Turner vze26m98 at optonline.net
Tue Jan 5 14:56:44 CET 2010


On Jan 5, 2010, at 8:07 AM, Ronald Oussoren wrote:

> There is a system installation of Python in /System/Library/ 
> Frameworks, and you can add other Python installations yourself.   
> The 2.6.4 installer at python.org installs 2.6.4 in /Library/ 
> Framework.   These different installations are completely separate  
> from each other and can contain different python packages, scripts.  
> Software has to explicitly choose which python it wants to use.

Also worth mentioning is that there are symlinks in /usr/local/bin for  
user-installed pythons that point to the /Library/Frameworks  
directory. (At least this is the case for my Python3 install)

So the shell does one of two things, given the name "python" on the  
command line: most likely, it searches directories for "python" based  
on the sequence of paths in your Bash .profile PATHS statement, or it  
looks in local directories before system directories. (Perhaps someone  
else has definitive information on this, sorry!)

So in the first case, if your /usr/local/bin precedes /usr/bin in your  
PATH statement, the OS will always find the user-installed python  
before the system installed python, effectively masking it.

Also, given that both "pythons" in /usr/bin and /usr/local/bin are  
symlinks, you can rename these to suit your organizational requirements.

HTH, Charles




More information about the Pythonmac-SIG mailing list