What is the correct way to install and upgrade Python packages on OS X Mountain Lion using Apple's built-in Python?
I tried everything that I can find here and in the documentation for various packages, but all the time I meet all kinds of errors that lead to unsuccessful or interrupted installations or updates. It is noteworthy that with pip I often get errors such as
RuntimeError: maximum recursion depth exceeded in cmp
or
SError: [Errno 24] Too many open files: '/Library/Python/2.7/site-packages'
and some pip commands (like list ) just don't exist at all.
I have an uptodate pip version that works fine with some packages and contains the latest Xcode command line tools.
The only thing that seems to work - and it works all the time - is
python setup.py install
Is this the right way to maintain and install python packages on Lion? Is there a reason not to use this method as the main method for storing packages? Should pip work for me or not work with Apple Python?
UPDATE: I spoke too soon. I also have problems with
python setup.py install
Sometimes (often) I get:
error: /Library/Python/2.7/site-packages: Too many open files
When nothing starts up in the new terminal, I get about 50 when I
lsof | grep python | wc -l
and if I exit Dropbox, which seems to be the source of this data, and reduce the number to 0, I still get βToo many open filesβ for most package installation operations using any tool that I use, even after rebooting my system.
Why do I often get the error "too many open files"?