I download python 3.2 and my first thought was that I need to uninstall the python 2.6.1 pre-installed in my computer. But later I found in python.org "You should never modify or delete these, as they are Apple-controlled and are used by Apple- or third-party software". I used "sudo rm -rf /Library/Frameworks/Python.Framework" to delete python 2.6.1. Now I truly want to undo this command(I want python 2.6.1 back!). What should I do? (or the question can be expressed as follows: how can I re-install the pre-installed python 2.6.1 in my mac?)
Asked
Active
Viewed 1,072 times
0
-
1This should probably be posted on superuser.com instead, as SO deals mainly with helping with programming issues. Here is a link to a question on how to reinstall it. http://stackoverflow.com/questions/917876/reinstall-library-python-on-os-x-leopard – adorablepuppy May 01 '11 at 02:38
-
As for 'upgrading' Python on mac, see http://stackoverflow.com/questions/1541776/upgrade-python-to-2-6-on-mac – Sridhar Ratnakumar May 01 '11 at 20:18
2 Answers
0
Reinstalling would work. In the future, don't delete Frameworks you didn't install.

John Percival Hackworth
- 11,395
- 2
- 29
- 38
0
Don't worry, that command will not remove it. The Apple-supplied Python in Mac OS X 10.6 is located at /System/Library/Frameworks/Python.framework
.
$ ls -l /usr/bin/python2.6
lrwxr-xr-x 1 root wheel 75 Nov 7 23:52 /usr/bin/python2.6@ -> ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6
Anything in /Library/Frameworks/Python.framework
was not put there by Apple, rather most likely by a python.org Python installer. The way to be sure is type:
$ /usr/bin/python2.6
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
That's the signature of the current Apple-supplied Python 2.6 in Mac OS X 10.6.
In general, do not modify or delete files in /System/Library
or in /usr
other than /usr/local
. Files in /Library
are under your control.

Ned Deily
- 83,389
- 16
- 128
- 151