Good morning,
I came across a problem when building matplotlib from source. On my desktop PC, running Ubuntu 8.10, I ran
python setup.py build
in an up-to-date svn checkout. The output (only dependencies, I don’t want to send all output, will do this if required)
···
============================================================================
BUILDING MATPLOTLIB
matplotlib: 0.98.6svn
python: 2.5.2 (r252:60911, Oct 5 2008, 19:24:49) [GCC
4.3.2]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.4.0.dev6870
freetype2: 9.18.3
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.27
Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
wxPython: 2.8.8.0
* WxAgg extension not required for wxPython >= 2.8
Gtk+: gtk+: 2.14.4, glib: 2.18.2, pygtk: 2.13.0,
pygobject: 2.15.3
Mac OS X native: no
Qt: no
Qt4: Qt: 4.4.3, PyQt4: 4.4.4
Cairo: 1.4.12
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: 1.4
pytz: 2008b
OPTIONAL USETEX DEPENDENCIES
dvipng: 1.11
ghostscript: 8.63
latex: 3.141592
pdftops: 3.00
[Edit setup.cfg to suppress the above messages]
I then copied the content of the build/lib…-directory to a folder that is in my $PYTHONPATH. When I then try to run any program embedding matplotlib in GTK, e.g. one of the examples that come with mpl, I receive the following error:
Traceback (most recent call last):
File “/home/thorsten/python/matplotlib/backends/backend_gtk.py”, line 352, in expose_event
self._render_figure(self._pixmap, w, h)
File “/home/thorsten/python/matplotlib/backends/backend_gtk.py”, line 340, in _render_figure
self.figure.draw (self._renderer)
File “/home/thorsten/python/matplotlib/figure.py”, line 739, in draw
if self.frameon: self.patch.draw(renderer)
File “/home/thorsten/python/matplotlib/patches.py”, line 302, in draw
renderer.draw_path(gc, tpath, affine, rgbFace)
File “/home/thorsten/python/matplotlib/backends/backend_gdk.py”, line 95, in draw_path
self.gdkDrawable.draw_polygon(gc.gdkGC, True, polygon)
TypeError: sequence members must be 2-tuples
I did the same first on my laptop, running still ubuntu 8.04, the ouput was
============================================================================
BUILDING MATPLOTLIB
matplotlib: 0.98.6svn
python: 2.5.2 (r252:60911, Jul 31 2008, 17:28:52) [GCC
4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
platform: linux2
REQUIRED DEPENDENCIES
numpy: 1.4.0.dev6870
freetype2: 9.16.3
OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.15beta5
Tkinter: no
* Using default library and include directories for
* Tcl and Tk because a Tk window failed to open.
* You may need to define DISPLAY for Tk to work so
* that setup can determine where your libraries are
* located. Tkinter present, but header files are not
* found. You may need to install development
* packages.
wxPython: 2.8.7.1
* WxAgg extension not required for wxPython >= 2.8
Gtk+: gtk+: 2.12.9, glib: 2.16.6, pygtk: 2.12.1,
pygobject: 2.14.2
Mac OS X native: no
Qt: no
Qt4: no
Cairo: 1.4.0
OPTIONAL DATE/TIMEZONE DEPENDENCIES
datetime: present, version unknown
dateutil: 1.3
pytz: 2007k
OPTIONAL USETEX DEPENDENCIES
dvipng: 1.9
ghostscript: 8.61
latex: 3.141592
pdftops: 3.00
[Edit setup.cfg to suppress the above messages]
and everything works fine with embedding.
Can anybody give me a hint what might be wrong?
Greetings,
Thorsten