I’m struggling with the installation of wxPython on FC6 and the Intel compiler, with a Python version compiled with it.
In fact, I had to generate again the swig files so that it could import the core.so module (don’t ask me why, now it works, before it could not locate it…) in the _core.py file, and now in the very same file, _core.py, the importation complains that wx.ID_ANY is not defined… If I correct this one, other appear, so I must have something wrong, once more…
wxWidgets was compiled from the wxPython source with : ./configure --prefix=/home/brucher/local/ --enable-unicode --with-gtk
wxPython was instalkled with : python setup.py UNICODE=1 EP_ADD_OPTS=1 install --prefix=/home/brucher/local/
the importation error :
import wx
Traceback (most recent call last):
File “”, line 1, in
File “/home/brucher/local//lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/init.py”, line 45, in
from wx._core import *
File “/home/brucher/local/lib/python2.6/site-packages/wx-
2.8-gtk2-unicode/wx/_core.py”, line 3759, in
class wxEvtHandler(wxObject):
File “/home/brucher/local/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wx/_core.py”, line 3818, in wxEvtHandler
I'm struggling with the installation of wxPython on FC6 and the Intel compiler, with a Python version compiled with it.
In fact, I had to generate again the swig files so that it could import the _core_.so module (don't ask me why, now it works, before it could not locate it...) in the _core.py file, and now in the very same file, _core.py, the importation complains that wx.ID_ANY is not defined... If I correct this one, other appear, so I must have something wrong, once more...
When you regenerated the swig files did you use the patched version of swig as described in wxPython/SWIG/README.txt? If not then that is likely the problem. One of the customizations allows me to automatically drop the leading 'wx' from the names. Without that mod you are probably getting things like wx.wxID_ANY instead.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
When you regenerated the swig files did you use the patched version of
swig as described in wxPython/SWIG/README.txt? If not then that is
likely the problem. One of the customizations allows me to
automatically drop the leading ‘wx’ from the names. Without that mod
you are probably getting things like wx.wxID_ANY instead.
Thank you, that should solve the problem.
What is more intriguing is that the original swig files lead to a bas import of core. Did someone tried to compile wxPython with something else than gcc ?
As I said, the original files did not make a usable wx module
What errors did you get?
When importing the wx module, it crashed in _core.py when importing the core module, although the lib was present.
With SWIG 1.3.31 files, it could import this module, but I don’t know why.