Hi Bedartha and others,
I have matplotlib 1.1.0 running fine on Mac OS X Lion with TkAgg, Qt4Agg, MacOSX and mplh5canvas backends in good working condition. My humble opinion is that this works because I do not try to replace System Python with my own version. Given that Lion ships with Python 2.7.1, I do not feel the need to upgrade it to Python.org’s 2.7.2 and potentially endure these kinds of installation woes. My current installation instructions for NumPy / SciPy / matplotlib / IPython on Lion (“current” because this is quite a moving target!) can be condensed as follows:
-
use homebrew as far as possible (but don’t use it to install Python, doh!)
-
brew install pkg-config gfortran zeromq pyqt (follow homebrew instructions for PYTHONPATH settings for pyqt dependencies)
-
use the System NumPy 1.5.1 - it’s good enough for my purposes
-
build git version of SciPy using gcc-4.2 - unfortunately still a (slight) pain until next stable release
-
sudo easy_install readline nose pyzmq Pygments ipython matplotlib
The detailed instructions are available upon request…
Once you have pkg-config installed via homebrew or otherwise, you can literally just easy_install matplotlib! (Thanks to JDH for recently updating the PyPI repository)
Regards,
Ludwig
···
On Thursday 10 November 2011 at 5:44 AM, matplotlib-users-request@lists.sourceforge.net wrote:
Message: 2
Date: Wed, 09 Nov 2011 11:22:42 -0800
From: “Russell E. Owen” <rowen@…2756…>
Subject: Re: [Matplotlib-users] Matplotlib “show()” error Mac OS X
Lion
Message-ID: <rowen-75CFDA.11224209112011@…1803…>
In article <629E8F74-C832-4500-9768-8AF5FB39D633@…3399…>,
Bedartha Goswami <goswami@…3399…>
wrote:
Hi,
I have recently installed Python 32/64bit from Python.org and then I
proceeded to install bumpy, scipy, matplotlib and igraph on it. But the
Matplotlib does not show the plots even if it opens a Figure window. Here is
a summary of what I had done in my installation:
I first did a “clean install” by following the instructions at (with an idea
to reinstall Matplotlib and see if the rror repeats):
http://matplotlib.sourceforge.net/faq/installing_faq.html#clean-install
So now my python does not have matplotlib:
Bedarthas-MacBook-Air:~ bedartha$ cd ~/Desktop/
Bedarthas-MacBook-Air:Desktop bedartha$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
import matplotlib
Traceback (most recent call last):
File “”, line 1, in
ImportError: No module named matplotlib
Bedarthas-MacBook-Air:Desktop bedartha$
Then I downloaded (again) the DMG file at:
http://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.1.0/m
atplotlib-1.1.0-py2.7-python.org-macosx10.3.dmg/download
and installed Matplotlib (which seems to go through fine). But after that:
Bedarthas-MacBook-Air:~ bedartha$ cd ~/Desktop/
Bedarthas-MacBook-Air:Desktop bedartha$ python
Python 2.7.2 (v2.7.2:8527427914a2, Jun 11 2011, 15:22:34)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
I suspect you are trying to install matplotlib on the 64-bit Python
instead of the 32-bit python for which it was built
I say this because 32-bit python is built using GCC 4.0.1.
There is no matplotlib binary for 64-bit Python yet because I’ve not
figured out how to build one successfully – I get horrible conflicts
with Tcl/Tk.
– Russell