wxPython.h: No such file or directory

Hi all, I am trying to build matplotlib from cvs on SuSE

    > 9.1.

    > python setup.py build results in

    > src/_wxagg.cpp:55:34: wx/wxPython/wxPython.h: No such file
    > or directory src/_wxagg.cpp: In member function `Py::Object
    > _wxagg_module::convert_agg_to_wx_image(const Py::Tuple&)':
    > src/_wxagg.cpp:105: error: `wxPyConstructObject' undeclared
    > (first use this function) src/_wxagg.cpp:105: error: (Each
    > undeclared identifier is reported only once for each
    > function it appears in.) src/_wxagg.cpp: In member function
    > `Py::Object _wxagg_module::convert_agg_to_wx_bitmap(const
    > Py::Tuple&)': src/_wxagg.cpp:129: error:
    > `wxPyConstructObject' undeclared (first use this function)
    > src/_wxagg.cpp: In function `void init_wxagg()':
    > src/_wxagg.cpp:260: error: `wxPyCoreAPI_IMPORT' undeclared
    > (first use this function) error: command 'gcc' failed with
    > exit status 1

    > Where can I find wxPython.h ?

Nils, if you don't specifically want the wxagg animated blit
functionality (as described here
http://www.scipy.org/wikis/topical_software/Animations), you can set
'BUILD_WXAGG = 0' in setup.py. Otherwise, you'll need to get the
devel headers as others have suggested.

Kevin, Do you think it would be possible to make the BUILD_WXAGG logic
a little smarter so that it doesn't kill the build process? Or
perhaps set BUILD_WXAGG to False by default. I'm afraid this one will
bite a lot of people who have wxpython installed but not the devel
headers (as noted in previous discussions, the debian devel packages
appear broken with respect to wxPython.h).

JDH

Kevin, Do you think it would be possible to make the BUILD_WXAGG logic
a little smarter so that it doesn't kill the build process? Or
perhaps set BUILD_WXAGG to False by default.

I will review buildext.py and see if I can add a check for the presence of `wxPython.h'. For now, you should probably set BUILD_WXAGG to False by default.

Maybe I should get this Kevin guy to help :wink:

I'm afraid this one will bite a lot of people who have wxpython installed
but not the devel headers (as noted in previous discussions, the debian devel
packages appear broken with respect to wxPython.h).

I'm working with Ron Lee to get that fixed. It looks like it may be an upstream issue, in that the wxPython distutils script doesn't even try to install the headers. It probably won't be a hard fix, once I've made sure I understand the problem.

Ken

···

On Sep 8, 2005, at 8:46 AM, John Hunter wrote:

John,

I just submitted a (lightly tested) patch to sourceforge which tries to detect that wxPython.h is missing. This situation is handled the same way a missing `wx-config' is, in that the build is only killed when BUILD_WXAGG is True (as opposed to just emitting a message when it's "auto").

Ken