Python on Mac: Fink? MacPorts? Builtin? Homebrew? Binary installer?
For the last few days, I have been trying to use Python for some audio development.
The thing is, Mac OSX does not handle uninstalling stuff well. Actually, there is no way to uninstall anything. Once it is on your system, you better pray that it didn't do any funny stuff. 开发者_运维知识库Hence, I don't really want to rely on installer packages for Python.
So I turn to Homebrew and install Python using Homebrew. Works fabulously. Using pip, Numpy, SciPy, Matplotlib were no (big) problem, either. Now I want to play audio. There is a host of different packages out there, but pip does not seem willing to install any. But, there is a binary distribution for PyGame, which I guess should work with the built-in Python.
Hence my question: What would you do? Would you just install the binary distributions and hope that they interoperate well and never need uninstalling? Would you hack your way through whichever package control management system you prefer and deal with its problems? Something else?
Short answer: use virtualenv
Longer answer:
1) Leave system Python as is (don't touch at all)
2) Install different versions of Python via this buildout: https://github.com/collective/buildout.python
3) Use virtualenv for every project
精彩评论