I’m working on a recently-upgraded OS X Snow Leopard and MacPorts and I’m running into problems at every corner.
The first problem is the sheer number of installed Python versions: altogether, there are four:
- 2.5, 2.6 and 3.0 in
/Library/Frameworks/Python.framework
- 2.6 in
/opt/local/Library/Frameworks/Python.framework/
(MacPorts installation)
So there are at least two开发者_运维百科 useless/redundant versions: 2.5 and the redundant 2.6.
Additionally, the pre-installed Python is giving me severe problems because some of the pre-installed libraries (in particular, scipy, numpy and matplotlib) don’t work properly.
I am sorely tempted to purge the complete /Library/Frameworks/Python.framework
path, as well as the MacPorts Python installation. After that, I’ll start from a clean slate by installing a properly configured Python, e.g. that from Enthought.
Am I running headlong into trouble? Or is this a sane undertaking?
(In particular, I need a working Python in the next few days and if I end up with a non-working Python this would be a catastrophe of medium proportions. On the other hand, some features I need from matplotlib aren’t working now.)
Macports only installs into /opt/local (for python and related).
Apple's python uses /Library/Frameworks/Python.framework/2.x 2.5 from Leopard and 2.6 for Snow Leopard but just puts a site-packages install in there on install
Thus I think you can get rid of /Library/Frameworks/Python.framework
I would the use the macports python and install numpy etc through that as I find that the easiest way for installing packages that have C dependencies
Alternatives are to install python for python.org and install numpy etc from that
精彩评论