I build matplotlib 0.87.7 for Python 2.5 with support for TkAgg and WXAgg, the latter using the binary wxPython 2.7 installer from <http://pythonmac.org/packages>. Unfortunately, the matplotlib had a problem: WxAgg failed with:
MemoryError: _wxagg.convert_agg_to_wx_bitmap(): could not create the wx.Bitmap
Disaabling acceleration as follows seems to work around the problem, but I don't know how complete a fix it is:
Christopher Barker was immensely helpful in explaining what was wrong. There are two issues:
1) The wxPython installer is finding the wrong wx-config. It finds the one for the outdated built-in wx instead of the one used by wxPython (which is deeply buried and very unlikely to be on your $PATH).
2) There are bugs in the particular wxPython 2.7 I was using that prevent building matplotlib. Note that 2.7.x is, by definition, a development branch; the next stable release series will be 2.8.x.
So the recipe that works is:
- Install wxPython 2.6.x (preferably the unicode version) from
or perhaps soon from:
- Put its wx-config on your path. I did this as follows:
sudo ln -s /usr/local/lib/wxPython-unicode-220.127.116.11/lib/wx/config/mac-unicode-debug-2.6
I suggest removing the link when finished since it won't be updated if you ever update wxPython.
(Note: I found the correct file by looking for wx-config using File Buddy).
- Install one or more numeric of numpy, numarray and/or Numeric
Binary installers are available at <http://pythonmac.org/packages/>
- Build matplotlib as usual.