1

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? – Pavel Nikolov Apr 23 '14 at 16:49
  • It's been so long that i don't remember what kind of fix i might have had. – garbage collection Apr 23 '14 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 – Pavel Nikolov Apr 23 '14 at 17:01
  • I would try installing python using homebrew – garbage collection Apr 23 '14 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 – Pavel Nikolov Apr 23 '14 at 18:04
3

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. – Andrew Theken Sep 24 '12 at 11:58
  • Copying from another computer /System/Library/Frameworks/Python.framework/Versions/ works like a charm! – Pavel Nikolov Apr 24 '14 at 20:52
1

/Library/Python is empty in a new installation.

  • On Lion, Python 2.7 Library is under /Library/Python I think. – garbage collection Jan 28 '12 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 '12 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 '12 at 14:33

You must log in to answer this question.

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