I am on Mac OS X 10.7.2. I deleted old python library folder before upgrading to newer python. But I found later that I should never delete the factory-shipped python.

The Apple-provided build of Python is installed in /System/Library/Frameworks/Python.framework and /usr/bin/python, respectively. You should never modify or delete these, as they are Apple-controlled and are used by Apple- or third-party software.

Is there a way to restore what I deleted in the folder?

  • Have you found a solution to this? That doesn't require a backup and doesn't require another mac running the same version as yours? Apr 23, 2014 at 16:49
  • It's been so long that i don't remember what kind of fix i might have had. Apr 23, 2014 at 16:53
  • I deleted the system python long time ago without thinking about the consequences. So far no problems at all... except for iPhoto no longer works. I just realized it is because of Python 2.6 missing. I don't have a good backup and I don't have where to get the system python from. Any tips or ideas how to restore it without having to reinstall OS X are much appreciated Apr 23, 2014 at 17:01
  • I would try installing python using homebrew Apr 23, 2014 at 17:26
  • I've done it already and I still get the same error. Here is the output when i try to start iPhoto from terminal pastebin.com/Dt4t0G9W Apr 23, 2014 at 18:04

2 Answers 2


I guess you may either restore from your Time Machine backup, or copy it back from another Mac running the same 10.7.2

  • 1
    while this solves the specific problem for the person that asked the question. The general requirement of another mac running the same version being available (and having a pristine copy) is not a good solution. Apple should have a way to do this. Sep 24, 2012 at 11:58
  • Copying from another computer /System/Library/Frameworks/Python.framework/Versions/ works like a charm! Apr 24, 2014 at 20:52

/Library/Python is empty in a new installation.

  • On Lion, Python 2.7 Library is under /Library/Python I think. Jan 28, 2012 at 20:05
  • Everything you install via easy_install or pip will go there. The Python standard library is in /System/Library/Frameworks/Python.framework/Versions/Current/lib/python2.7.
    – Debilski
    Jan 29, 2012 at 14:28
  • System relevant data (such as the Python standard library) is almost never stored in /Library/. /Library is for user-installed additional stuff.
    – Debilski
    Jan 29, 2012 at 14:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .