Mac OSX 64bit

Dear Scott & Bryan,

Thanks for the advice!

Neither the dmg nor the supposedly 32bit egg on sourceforge worked for
me, even after I deleted 64bit Python 2.7.2. @Bryan: Thanks for
suggesting MacPorts: I didn't know about that and you are right that
that would have been a good solution.

Here is how I solved it (with serious help from a friend):
The problem seems to be that tcl/tk on MacOSX is 32bit, which is why
there is no 64bit Mac distribution on sourceforge.

I downloaded the source from sourceforge (matplotlib_1.0.1.tar.gz)
then expanded it into a temp directory.

In the root directory,
I uncommented line 11
and changed it to

Then in, line 832, I removed
(as suggested by't-install-from-PyPi-td32404788.html)

Then "python install" (do not use "build").
And that was all done.

Another solution might be to build 64bit Tcl/Tk on MacOSX.
Instructions are here:
but I have not tried this and it seems like this solution needs python
to be rebuilt as well.

Does the installation page needs updating?

I'm copying this e-mail to the list so it is archived. Gavin.


On 2 October 2011 23:05, Scott Lasley <slasley@...2425...> wrote:

On Oct 2, 2011, at 9:10 AM, Gavin Koh wrote:

Dear all,

Just installed Python 2.7.2 on my Mac running OSX 10.6. Installed
numpy 1.6.1 and scipy 0.9.0 both from the dmg's downloaded from scipy.
Just tried to install matplotlib but there is no 64bit dmg available.
Tried installing from the egg instead, but that doesn't help.
Am getting
ImportError: dlopen(/Library/Python/2.7/site-packages/matplotlib-1.0.1_r0-py2.7-macosx-10.3-fat.egg/matplotlib/,
2): no suitable image found. Did find:
no matching architecture in universal wrapper
Trying to build from source but failing desperately. Help, please?

This site helped me to build matplotlib for OS X a while back - HJBlog > Building 64bit NumPy/SciPy/PyLab on Snow Leopard
Since you already have python 2.7.2, numpy and scipy installed, you can probably skip down to the section on building matplotlib. Some information on the page is out of date. For example, the source is now on github at GitHub - matplotlib/matplotlib: matplotlib: plotting with Python

I use the gfortran compiler from the R project page - Tools - R for Mac OS X - developer's page - GNU Fortan for Xcode

I am by no means an expert at building matplotlib, but I'm happy to help if you still have problems getting it running on your mac.

Hofstadter's Law: It always takes longer than you expect, even when
you take into account Hofstadter's Law.
—Douglas Hofstadter (in Gödel, Escher, Bach, 1979)

Does the installation page needs updating?

Yes. I made several changes to those docs for the v1.1.0 release. Hopefully, it will make things clearer.

Ben Root