Hi,
I'm interested in using wxPython from within the R
statistics language:
http://www.R-Project.org/
I have succeeded in doing this in Windows (installing Python and
wxPython as binaries) and have some initial examples here:
http://bioinf.wehi.edu.au/folders/james/wxPython/
The R-wxPython package requires the RSPython package:
http://bioinf.wehi.edu.au/folders/james/RSPython/
But so far, efforts to get it working on Fedora Linux have
failed. I have tried a few different installation strategies
(see the end of this email), but I keep getting the following
error when I try to import wxPython.wx while running Python
from within R:
Error in Python call:
/usr/lib/python2.2/site-packages/wx/_core.so: undefined symbol:
PyExc_IOError
I can run the wxPython samples without any problems (i.e.
without using R), and from R I can get two-way communication
to-and-from Python (two event-loops running). But I can't seem
to avoid the error above.
Installation Strategies
ยทยทยท
-----------------------
Initially (as I don't have root privileges), I installed Python
and wxPython from source within my home area, i.e. in
~/usr/local/
When I got the error above, I tried rebuilding Python and
wxPython from source with compiler/linker options like -Wl,E and
-Xlinker -export-dynamic, see:
http://mail.python.org/pipermail/python-list/2003-July/173361.html
http://www.swig.org/Doc1.3/Python.html#n7
but this didn't seem to help.
Then my Linux administrator tried installing wxPython from RPM,
installing against these existing RPMs:
python-2.2.3-7
python-devel-2.2.3-7
glib-1.2.10-11
gtk2-2.2.4-5.1
gdk-pixbuf-0.22.0-3.0
gdk-pixbuf-gnome-0.22.0-3.0
gdk-pixbuf-devel-0.22.0-3.0
But I encountered errors when running the wxPython samples:
(FrogEdit.py:5981): Gdk-WARNING **: gdkdrawable-x11.c:1012
drawable is not a pixmap or window
free(): invalid pointer 0x80f0120!
(FrogEdit.py:5981): Gtk-WARNING **: Error loading icon: Failed
to load image
'/usr/share/icons/Bluecurve/20x20/stock/gtk-cancel.png': Fatal
error in PNG image file: invalid block type
Segmentation fault
etc.
Maybe the wxPython RPM assumes a more specific version of
gtk than gtk2_xxx ? Likewise for other RPM dependencies?
So my administrator built wxPython from source, and so then the
wxPython samples worked fine (from Python), but I got the same
error from within R:
Error in Python call:
/usr/lib/python2.2/site-packages/wx/_core.so: undefined symbol:
PyExc_IOError
I would be most appreciative if anyone has any suggestions.
Regards,
James
--------------------------------------------------------------------------
James Wettenhall Tel: (+61 3) 9345 2629
Division of Genetics and Bioinformatics Fax: (+61 3) 9347 0852
The Walter & Eliza Hall Institute E-mail: wettenhall@wehi.edu.au
of Medical Research, Mobile: (+61 / 0 ) 438 527 921
1G Royal Parade,
Parkville, Vic 3050, Australia
http://www.wehi.edu.au
--------------------------------------------------------------------------