Created
October 3, 2013 12:37
-
-
Save riccardobenini/6809148 to your computer and use it in GitHub Desktop.
Python script to update the Apple Python distro to the most recent
This is for python 3.3; change those version to 2.7 or what else if it applies. The script remove the default folder in system/library, then moves the latest installed version to the same folder.
It also create the symbolic links and updates the executable in usr/bin necessary fo…
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -R /System/Library/Frameworks/Python.framework/Versions/3.3 | |
mv /Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions | |
chown -R root:wheel /System/Library/Frameworks/Python.framework/Versions/3.3 | |
rm /System/Library/Frameworks/Python.framework/Versions/Current | |
ln -s /System/Library/Frameworks/Python.framework/Versions/3.3 /System/Library/Frameworks/Python.framework/Versions/Current | |
rm /usr/bin/pydoc | |
rm /usr/bin/python | |
rm /usr/bin/pythonw | |
rm /usr/bin/python-config | |
rm /System/Library/Frameworks/Python.framework/Versions/3.3/bin/pydoc | |
rm /System/Library/Frameworks/Python.framework/Versions/3.3/bin/python | |
rm /System/Library/Frameworks/Python.framework/Versions/3.3/bin/pythonw | |
rm /System/Library/Frameworks/Python.framework/Versions/3.3/bin/python-config | |
ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/pydoc3 /usr/bin/pydoc | |
ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/python3 /usr/bin/python | |
ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/pythonw3 /usr/bin/pythonw | |
ln -s /System/Library/Frameworks/Python.framework/Versions/3.3/bin/python3-config /usr/bin/python-config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment