I found a solution after all, from http://old.nabble.com/_backend_gdk-not-found-td26514059.html#a26514059 the thread I mentioned in the original post, which turned out not to be as cryptic as I had thought.
Just as the answerer there suggested, I had PyGTK but matplotlib wasn't recognizing it during build; when I tried building from source instead of using macports this was made clear in the build output. As he said, I searched my computer to find a file called pygtk-2.0.pc, and added the directory it was in to the system variable PKG_CONFIG_PATH. After I did that, the build was successful and I had no further problems! Thanks to everyone who may have read my post, but I would up figuring this one out on my own. thecommexokid wrote: > > Hi all, > > I am new to the forum and to all things PyGTK and matplotlib, so go easy on me, please. > > A colleague created a Python program that uses matplotlib and GTK. I wanted to be able run her program on my MacBook (OS X 10.6.7). I used macports to update/obtain Python 2.7, matplotlib 1.0.1, and PyGTK 2.22.0. (I also obtained ipython, if anyone cares.) > > After all of this, my colleague's program hits a snag when I try to run it; here is the traceback: > > Traceback (most recent call last): > File "main.py", line 5, in > from interface import Interface, Display, Controls > File "/Users/thecommexokid/Documents/CurrentProjects/Honors/DoubleSlit/interface.py", line 5, in <module> > from matplotlib.backends.backend_gtkagg import FigureCanvasGTKAgg > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_gtkagg.py", line 10, in <module> > from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\ > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_gtk.py", line 28, in <module> > from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK > File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/matplotlib/backends/backend_gdk.py", line 29, in <module> > from matplotlib.backends._backend_gdk import pixbuf_get_pixels_array > ImportError: No module named _backend_gdk > > I believe I may be having the same problem as the user in http://old.nabble.com/_backend_gdk-not-found-td26514059.html#a26514059 this post , but I am enough of a novice that the solution that was suggested there just sounds like gobbletygook to me. If anybody wants to elaborate on that so I can try it out, please do. > > Anyhow, any advice anyone has on how to overcome this problem and get her program running on my machine would be greatly appreciated. As I said, I am new to these things, and I don't really understand the interplay between Python, PyGTK, and matplotlib, so if there's crucial information I haven't provided, or if this isn't the best forum in which to be asking this question, let me know. > > Thanks in advance for the help. > > *** > > PS: I originally posted this question at the GTK+ Forums ( http://www.gtkforums.com/viewtopic.php?f=3&p=69969#p69969 thread ), but it seemed as though this might be the more appropriate forum. I'll be sure to keep both threads updated with any developments. > -- View this message in context: http://old.nabble.com/ImportError-when-I-import-FigureCanvasGTKAgg%E2%80%94seeking-advice%21-tp31779648p31785774.html Sent from the matplotlib - users mailing list archive at Nabble.com.
------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users