[Pythonmac-SIG] using matplotlib, ipython, etc. w/MacPython
bthom at cs.hmc.edu
Thu Dec 7 08:27:41 CET 2006
I've spent the last 2 weeks wrestling w/macports python/packages.
Today, in advice to a question, Robert Kern advised that I use the
MacPython "official" distribution.
I now need to quickly get MacPython up to the (hopefully less buggy)
state than where I had gotten w/the macports setup. Specifically, I
1) use matplotlib interactively, which requires something like TkAgg
or WxAgg. (W/macports WxAgg is the only backend that works)
2) have python access to Tk (aka tkinter)
3) have ipython
4) have Numeric access
I'd also be interested in numpy/scipy if it is an easy install.
I'm entirely new to Tk, so there could use more detailed advice.
I did find a useful blurb on http://matplotlib.sourceforge.net/
installing.html (appended), but alas:
1) pythonmac.org/packages server is not responding
2) the MacEnthon link leads to a page that has yet to be created
3) the "step-by-step" link says "under revision; come back soon"
Perhaps the Moad bundle will work?
Advice gratefully appreciated.
All of the backends run on OS X. Chris Barker has built a binary
package (fink users see below) for matplotlib which is hosted on
pythonmac, and works with Agg, Wx and Tk; see the step-by-step
instructions kindly provided by Michael Tobis. It does not included
the GTK* backends, because pygtk is usually provided through fink and/
or darwinport. This version should work on an stock OS-X 10.3.*, and
you need Numeric or numarray (available on the same site), and TK or
wxPython, if you want to use those back ends.
There are other binary packages to look at which each have different
components included. Robery Kern has built an all-in-one installer
which includes scipy, Numeric, numarray, matplotlib, ipython, VTK,
MayaVi, PIL, the enthought tool suite and much more; see >MacEnthon.
Charlie Moad has bundled matplotlib with freetype, png, wx, numarray,
numeric and doesn't rely on fink or darwinports; available in the
Tools Section. Another bundle is scisoft which packages many
scientific packages for python on OS X, including matplotlib,
although it is designed for astronomical analysis.
If you want to compile yourself on OS X, make sure you read the
compiling instructions above. You will need to install freetype2,
libpng and zlib via fink or from src, or from a package manager such
as fink or i-Installer. You will also need the base libraries for a
given backend. Eg, if you want to run TkAgg, you will need a python
with Tkinter; if you want to use WxAgg, install wxpython. See
backends for a more comprehensive discussion of the various backend
requirements. Edit setup.py to configure the backends you want to
build as described above.
Note when running a GUI backend in OSX, you should launch your
programs with pythonw rather than python, or you may get
I do not want to compile code myself unless absolutely necessary. I
was wondering what was up with the "MacEnton" suite; clicking on the
link described at the above web page informs me that the "MacEnthon"
page does not exist.
More information about the Pythonmac-SIG