Hello I don't know why, but after switching from python2.5 to python2.6 I cannot even launch matplotlib (matplotlib-0.98.5.3.win32-py2.6.exe). This is what I get: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "D:\msys\opt\python\lib\site-packages\pylab.py", line 1, in <module> from matplotlib.pylab import * File "D:\msys\opt\python\lib\site-packages\matplotlib\pylab.py", line 253, in <module> from matplotlib.pyplot import * File "D:\msys\opt\python\lib\site-packages\matplotlib\pyplot.py", line 75, in <module> new_figure_manager, draw_if_interactive, show = pylab_setup() File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\__init__.py", line 25, in pylab_setup globals(),locals(),[backend_name]) File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtkagg.py", line 10, in <module> from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, FigureCanvasGTK,\ File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtk.py", line 25, in <module> from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK File "D:\msys\opt\python\lib\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 have PyGTK installed. What can be the problem? win xp sp3
Hi, I'm using the GTKAgg backend and when I run "import matplotlib.pyplot as plt" in the Python shell, I get the _backend_gdk error. I checked all the files in my backend and there is no _backend_gdk.py. In fact, there are no python modules that start with an underscore. It seems that some files were not installed. Is there some kind of a gtk dependancy I need to install before installing matplotlib? If so, where can I get it? My matplot version is 1.3.1. thanks -- View this message in context: http://matplotlib.1069221.n5.nabble.com/ImportError-No-module-named-backend-gdk-tp43753.html Sent from the matplotlib - users mailing list archive at Nabble.com.
discolemonade, on 2014年08月05日 21:29, wrote: > Hi, > > I'm using the GTKAgg backend and when I run "import matplotlib.pyplot as > plt" in the Python shell, I get the _backend_gdk error. I checked all the > files in my backend and there is no _backend_gdk.py. In fact, there are no > python modules that start with an underscore. As a rule of thumb, modules that start with an underscore come from a compiled C or C++ extension. In this case, the source file in question lives in src/_backend_gdk.c of the matplotlib directory. > It seems that some files were not installed. Is there some kind > of a gtk dependancy I need to install before installing > matplotlib? If so, where can I get it? My matplot version is > 1.3.1. Yes, you'll need GTK and its headers installed, something like sudo apt-get install libgtk2.0-dev python-gtk2-dev should work on a Debian system, though you should probably just sudo apt-get build-dep python-matplotlib best, -- _ / \ A* \^ - ,./ _.`\\ / \ / ,--.S \/ \ / `"~,_ \ \ __o ? _ \<,_ /:\ --(_)/-(_)----.../ | \ --------------.......J Paul Ivanov ipython and matplotlib core developer http://pirsquared.org
Thanks Paul. I'm new to all of this and the interplay between GTK, it's headers and matplotlib is admittedly still a bit of a mystery to me. I have GTK installed. I installed it after installing matplotlib because I tried to use TKAgg as a backend and ended up running into some problems. I'm on MacOSX Mavericks. I've been googling around and there don't seem to be any direct answers for how to gett these headers installed on Mac OS. What's the quickest way to get these headers on my system(via homebrew?)? And once I get them, do I have to reinstall matplotlib so that it can recognize the headers? -- View this message in context: http://matplotlib.1069221.n5.nabble.com/ImportError-No-module-named-backend-gdk-tp43753p43761.html Sent from the matplotlib - users mailing list archive at Nabble.com.
I recommend MacPorts [1] to install open source packages on Mac, including matplotlib. -Sterling [1] http://www.macports.org/ On Aug 6, 2014, at 8:15PM, discolemonade wrote: > Thanks Paul. I'm new to all of this and the interplay between GTK, it's > headers and matplotlib is admittedly still a bit of a mystery to me. I have > GTK installed. I installed it after installing matplotlib because I tried to > use TKAgg as a backend and ended up running into some problems. I'm on > MacOSX Mavericks. I've been googling around and there don't seem to be any > direct answers for how to gett these headers installed on Mac OS. What's the > quickest way to get these headers on my system(via homebrew?)? And once I > get them, do I have to reinstall matplotlib so that it can recognize the > headers? > > > > -- > View this message in context: http://matplotlib.1069221.n5.nabble.com/ImportError-No-module-named-backend-gdk-tp43753p43761.html > Sent from the matplotlib - users mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Infragistics Professional > Build stunning WinForms apps today! > Reboot your WinForms applications with our WinForms controls. > Build a bridge from your legacy apps to the future. > http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Hi, On Wed, Aug 6, 2014 at 8:15 PM, discolemonade <sch...@gm...> wrote: > Thanks Paul. I'm new to all of this and the interplay between GTK, it's > headers and matplotlib is admittedly still a bit of a mystery to me. I have > GTK installed. I installed it after installing matplotlib because I tried to > use TKAgg as a backend and ended up running into some problems. As a matter of interest - what problem did you have? How did you install matplotlib? > I'm on > MacOSX Mavericks. I've been googling around and there don't seem to be any > direct answers for how to gett these headers installed on Mac OS. What's the > quickest way to get these headers on my system(via homebrew?)? Does 'brew install gtk+' work for that? > And once I > get them, do I have to reinstall matplotlib so that it can recognize the > headers? I'm afraid so. If I were you, I'd check out the source for that, as in: git clone git://github.com/matplotlib/matplotlib.git cd matplotlib git checkout v1.3.1 python setup.py install Feel free to post again if that doesn't work. Cheers, Matthew
I also use matplotlib-0.98.5.3.win32-py2.6.exe. It was built without gtk. You have to build your own binaries with gtk support. Or find compiled package (by Christoph Gohlke) with gtk support here: http://www.lfd.uci.edu/~gohlke/#pythonlibs and original information is here: http://www.nabble.com/matplotlib-0.98.5.3.win32-py2.6.exe-td24299490.html Personally I suggest use TkAgg. It dosen't matter if the figure window is smaller than the canvas. If you don't resize the window (i.e. you have checked the figure is ok and replotted the figure), it is ok to just save it by clicking save icon in the toolbar. On Thu, Jul 30, 2009 at 8:34 PM, Sebastian Pająk<spc...@gm...> wrote: > Hello > I don't know why, but after switching from python2.5 to python2.6 I > cannot even launch matplotlib (matplotlib-0.98.5.3.win32-py2.6.exe). > This is what I get: > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "D:\msys\opt\python\lib\site-packages\pylab.py", line 1, in <module> > from matplotlib.pylab import * > File "D:\msys\opt\python\lib\site-packages\matplotlib\pylab.py", > line 253, in <module> > from matplotlib.pyplot import * > File "D:\msys\opt\python\lib\site-packages\matplotlib\pyplot.py", > line 75, in <module> > new_figure_manager, draw_if_interactive, show = pylab_setup() > File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\__init__.py", > line 25, in pylab_setup > globals(),locals(),[backend_name]) > File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtkagg.py", > line 10, in <module> > from matplotlib.backends.backend_gtk import gtk, FigureManagerGTK, > FigureCanvasGTK,\ > File "D:\msys\opt\python\lib\site-packages\matplotlib\backends\backend_gtk.py", > line 25, in <module> > from matplotlib.backends.backend_gdk import RendererGDK, FigureCanvasGDK > File "D:\msys\opt\python\lib\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 have PyGTK installed. What can be the problem? > win xp sp3 > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >