views:

668

answers:

3

I accidentally removed /Library/Python on OS X Leopard. How can I reinstall that?

+1  A: 

If you'd like, I'll create a tarball from a pristine installation. I'm using MacOSX 10.5.7, and only 12K.

Gary Chambers
Yes, please. Thanks!
exalted
On its way to the address you list on your CV at pittle.org.
Gary Chambers
I'm afraid, I didn't get it...
exalted
Try retrieving it from http://share1t.com/fyya8o
Gary Chambers
+1  A: 

I'm using 10.4, but unless the installation changed dramatically in 10.5, /Library/Python is just a place to install local (user-installed) packages; the actual Python install is under /System. On 10.4, I have the following structure:

/Library/
    Python/
        2.3/
            README
            site-packages/
                README

So just re-creating that structure may suffice. (But instead of 2.3, use the version of Python installed on 10.5.)

mipadi
+1  A: 

/Library/Python contains your python site-packages, which is the local software you've installed using commands like python setup.py install. The pieces here are third-party packages, not items installed by Apple - your actual Python installation is still safe in /System/Library/etc...

In other words, the default OS leaves these directories mostly blank... nothing in there is critical (just a readme and a path file).

In this case, you'll have to :

  1. Recreate the directory structure:

  2. Re-install your third-party libraries.

The directory structure on a default OS X install is:

/Library/Python/2.3/site-packages /Library/Python/2.5/site-packages

Jarret Hardie