Re: [Matplotlib-users] Matplotlib with native OSX port of GTK

2008-11-11 Thread John Hunter
On Mon, Nov 10, 2008 at 6:00 AM, Marcus Vinicius Eiffle Duarte
[EMAIL PROTECTED] wrote:

 So, all the libraries and headers are installed in the default
 folders. However, when I try to  build matplotlib I get the following
 error:
 In file included from src/backend_gdk.c:9:
 /usr/include/pygtk/pygtk.h:6:23: error: pygobject.h: No such file or directory
 /usr/include/pygtk/pygtk.h:8:21: error: gtk/gtk.h: No such file or directory
 In file included from src/backend_gdk.c:9:

The error indicates the mpl build process is not finding your pygtk or
gtk headers.  Typically, you need to set your PKG_CONFIG_PATH to the
directory where the *.pc config files are, and these will tell mpl how
to include the headers and link to the libs.  So you should also have
pkg-config installed.  There are some additional details here:
http://ipython.scipy.org/moin/Py4Science/InstallationOSX -- scroll
down to the matplotlib section.

JDH

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Matplotlib with native OSX port of GTK

2008-11-10 Thread Marcus Vinicius Eiffle Duarte
Hi, folks!

I am trying to compile matplotlib-0.98.3 on OSX 10.5.5. with support
for the native port of GTK-2.0 (www.gtk-osx.org). I am doing this
because the official egg gives an error when my GUIs try to create a
canvas using GTK (with all renderers: GDK, Agg or Cairo). I assume the
official egg was compiled without support for GTK on OSX.
I compiled GTK-2.0 and PyGTK using code and instructions from Imendio,
and it all works fine. The apps I developed on a Ubuintu system run
fine on OSX, except for the matplotlib part.
So, all the libraries and headers are installed in the default
folders. However, when I try to  build matplotlib I get the following
error:

macproctp8:matplotlib-0.98.3 ctp8$ python setup.py build

BUILDING MATPLOTLIB
matplotlib: 0.98.3
python: 2.5.1 (r251:54863, Apr 15 2008, 22:57:26)  [GCC
4.0.1 (Apple Inc. build 5465)]
  platform: darwin

REQUIRED DEPENDENCIES
 numpy: 1.3.0.dev5934
 freetype2: found, but unknown version (no pkg-config)

OPTIONAL BACKEND DEPENDENCIES
libpng: 1.2.32
   Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4
  wxPython: 2.8.4.0
* WxAgg extension not required for wxPython = 2.8
  Gtk+: gtk+: 2.15.0, glib: 2.19.1, pygtk: 2.13.1,
pygobject: 2.15.5
* Could not find Gtk+ headers in any of
* '/usr/include', '/usr/X11R6/include', '.'
Qt: no
   Qt4: no
 Cairo: 1.4.12

OPTIONAL DATE/TIMEZONE DEPENDENCIES
  datetime: present, version unknown
  dateutil: present, version unknown
/Library/Python/2.5/site-packages/pytz-2008g-py2.5.egg/pytz/__init__.py:32:
UserWarning: Module dateutil was already imported from
/Library/Python/2.5/site-packages/dateutil-1.2-py2.4.egg/dateutil/__init__.pyc,
but /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
is being added to sys.path
/Library/Python/2.5/site-packages/pytz-2008g-py2.5.egg/pytz/__init__.py:32:
UserWarning: Module pytz was already imported from
/Library/Python/2.5/site-packages/pytz-2008g-py2.5.egg/pytz/__init__.py,
but /Library/Python/2.5/site-packages/matplotlib-0.98.3-py2.5-macosx-10.3.egg
is being added to sys.path
  pytz: 2008g

OPTIONAL USETEX DEPENDENCIES
dvipng: 1.11
   ghostscript: 8.62
 latex: 3.1415926

EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES
 configobj: matplotlib will provide
  enthought.traits: no

[Edit setup.cfg to suppress the above messages]

running build
running build_py
copying lib/matplotlib/mpl-data/matplotlibrc -
build/lib.macosx-10.5-i386-2.5/matplotlib/mpl-data
copying lib/matplotlib/mpl-data/matplotlib.conf -
build/lib.macosx-10.5-i386-2.5/matplotlib/mpl-data
running build_ext
building 'matplotlib.backends._backend_gdk' extension
gcc -fno-strict-aliasing -Wno-long-double -no-cpp-precomp
-mno-fused-madd -fno-common -dynamic -DNDEBUG -g -Os -Wall
-Wstrict-prototypes -DMACOSX -I/usr/include/ffi -DENABLE_DTRACE -arch
i386 -arch ppc -pipe
-I/Library/Python/2.5/site-packages/numpy-1.3.0.dev5934-py2.5-macosx-10.3-i386.egg/numpy/core/include
-I/usr/include -I/usr/X11R6/include -I. -I/usr/include
-I/usr/X11R6/include -I.
-I/System/Library/Frameworks/Python.framework/Versions/2.5/include/python2.5
-c src/backend_gdk.c -o
build/temp.macosx-10.5-i386-2.5/src/backend_gdk.o
In file included from src/backend_gdk.c:9:
/usr/include/pygtk/pygtk.h:6:23: error: pygobject.h: No such file or directory
/usr/include/pygtk/pygtk.h:8:21: error: gtk/gtk.h: No such file or directory
In file included from src/backend_gdk.c:9:
/usr/include/pygtk/pygtk.h:14: error: syntax error before 'atom'
/usr/include/pygtk/pygtk.h:17: error: syntax error before '*' token
/usr/include/pygtk/pygtk.h:18: error: syntax error before '*' token
/usr/include/pygtk/pygtk.h:19: error: syntax error before '}' token
/usr/include/pygtk/pygtk.h:24: error: syntax error before 'gchar'
src/backend_gdk.c: In function 'pixbuf_get_pixels_array':
src/backend_gdk.c:28: error: 'PyGObject' undeclared (first use in this function)
src/backend_gdk.c:28: error: (Each undeclared identifier is reported only once
src/backend_gdk.c:28: error: for each function it appears in.)
src/backend_gdk.c:28: error: 'py_pixbuf' undeclared (first use in this function)
src/backend_gdk.c:29: error: 'GdkPixbuf' undeclared (first use in this function)
src/backend_gdk.c:29: error: 'gdk_pixbuf' undeclared (first use in
this function)
src/backend_gdk.c:37: warning: implicit declaration of function 'GDK_PIXBUF'
src/backend_gdk.c:43: warning: implicit declaration of function
'gdk_pixbuf_get_height'
src/backend_gdk.c:44: warning: implicit