[Pythonmac-SIG] Python development on OSX
skip at pobox.com
skip at pobox.com
Tue Jan 18 01:17:40 CET 2011
Tony> I do want 2.7 because it's a requirement at work. I want to have
Tony> the same versions & packages to avoid compatibility issues.
Tony> I can put Python2.7 in a different directory and leave 2.6 there
Tony> but I want the 2.7 installation to be the default one.
Default for you or default for the system? It's easy to make it the default
for you. Just make sure the installation directory appears in your PATH
ahead of /usr/bin. I believe the installer does that by default. I just
installed the 2.7 framework build the other day. Now it appears ahead of my
other locations:
% type -a python
python is /Library/Frameworks/Python.framework/Versions/2.7/bin/python
python is /Users/skip/local/bin/python
python is /usr/local/bin/python
python is /usr/bin/python
You almost certainly *don't* want it to replace /usr/bin/python. That's
Apple's territory. I don't know where Apple might put proprietary modules,
but it's somewhere in
/System/Library/Frameworks/Python.framework/Versions/2.5
(on Leopard, at least). If you were to overwrite /usr/bin/python you'd
deprive any system Python apps from modules they need. In the
just-installed 2.7 I mentioned above I find 103 shared object files. In the
above /System/.../2.5 directory I find 213. My guess is that many of them
were put there by Apple.
Resist the temptation. Make it your default, not the system default.
--
Skip Montanaro - skip at pobox.com - http://www.smontanaro.net/
More information about the Pythonmac-SIG
mailing list