views:

105

answers:

1

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.)

+2  A: 

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

Mark
Aren’t there things which won’t work any more after I uninstall the Python installation found in `/Library/…`? Anyway, I’ll give the MacPorts-only route a chance. Thanks.
Konrad Rudolph
… and now it insists on building gcc43 from source. This is why I hate MacPorts. :-(
Konrad Rudolph
try port install py26-numpy -no_gcc43 (Agreed seems odd but this is because gfrortran requires gcc 4.3 (due to licensing agruments I think)
Mark
Apple's python does not install any actual code in /Library/Frameworks this is used for adding new packages which you say don't work so I don't think you are worse off
Mark