After many unsuccessful attempts at getting matplotlib installed on OS X Lion, I ran across this page:
Installing Matplotlib on OS X 10.7 with Homebrew « Random Musings for the Digital Age
Following these instructions got me the closest I have been:
$ brew install python
$ brew install gfortran
$ brew install pkg-config
$ easy_install pip
$ pip install numpy
$ cd $HOME
$ git clone https://github.com/matplotlib/matplotlib.git
$ cd matplotlib
$ python setup.py build
$ python setup.py install
At the moment, I’m trying to get a script that was working on EPD 7.1 to work on Python 2.7.2. I’m using the TkAgg backend.
The first messages I see when running the script are:
objc[68962]: Class TKApplication is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
objc[68962]: Class TKMenu is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
objc[68962]: Class TKContentView is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
objc[68962]: Class TKWindow is implemented in both /Library/Frameworks/Tk.framework/Versions/8.5/Tk and /Library/Frameworks/Tk.framework/Versions/8.6/Tk. One of the two will be used. Which one is undefined.
For both Tk and Tcl, …/Versions/Current points to 8.6.
From there, everything is fine until it executes show(), when I get the following messages:
Exception in Tkinter callback
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-tk/Tkinter.py”, line 1410, in call
return self.func(*args)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py”, line 236, in resize
self.show()
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_tkagg.py”, line 240, in draw
tkagg.blit(self._tkphoto, self.renderer._renderer, colormode=2)
File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/tkagg.py”, line 19, in blit
tk.call("PyAggImagePhoto", photoimage, id(aggimage), colormode, id(bbox_array))
TclError
Can anyone suggest how to resolve this problem?
Thanks,
Lynn