Problem with "import wx"

Hello everybody!

I've been desperately trying to get wxpython to run for a while now...
I've installed and reinstalled a lot, but I think the important
information is that I compiled wxGTK 2.6.1 and wxPython 2.6.1 from
source. Problem is: When I'm trying to do "import wx" in python, I get
the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.3/site-packages/wx/__init__.py", line 45, in ?
    from wxPython import wx
  File "/usr/lib/python2.3/site-packages/wxPython/__init__.py", line 20,
in ?
    import wxc
ImportError: /usr/lib/python2.3/site-packages/wxPython/wxc.so: symbol
_ZNK7wxTimer12GetClassInfoEv, version WXGTK_2.4 not defined in file
libwx_gtk-2.4.so.0 with link time reference

I read that this may have something to do with using gcc 2.9 on a debian
testing/unstable system, but I have gcc version 3.3.4, and wxGTK has
been compiled with it.

So... any ideas? I'm really lost here, and google is not very supportive :frowning:

Thanks a lot in advance,
-Wojtek

···

--
This is a .signature-virus. If you see this, copy it into your .signature!
If you don't know what a .signature is, you've most probably been
infected by another virus of name Microsoft. In this case, please remove
yourself from my fov or infect yourself with linux :wink:

Dom, 2005-06-19 às 23:23 +0200, Wojtek Dabrowski escreveu:

Hello everybody!

I've been desperately trying to get wxpython to run for a while now...
I've installed and reinstalled a lot, but I think the important
information is that I compiled wxGTK 2.6.1 and wxPython 2.6.1 from
source. Problem is: When I'm trying to do "import wx" in python, I get
the following error:

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.3/site-packages/wx/__init__.py", line 45, in ?
    from wxPython import wx
  File "/usr/lib/python2.3/site-packages/wxPython/__init__.py", line 20,
in ?
    import wxc
ImportError: /usr/lib/python2.3/site-packages/wxPython/wxc.so: symbol
_ZNK7wxTimer12GetClassInfoEv, version WXGTK_2.4 not defined in file
libwx_gtk-2.4.so.0 with link time reference

It seems that you have wxGTK 2.4/wxPython 2.4 installed in your system
and when you do this import you are importing the 2.4 (that has that
problem as I can see) and not the 2.6.

Starting with 2.5.3.0 wxpython support multiversions ... Read this
http://wiki.wxpython.org/index.cgi/MultiVersionInstalls

Just to isolate the problem go to your python
site-package(/usr/lib/python2.3/site-packages) and do a:
  mv wx wx0
  mv wxPython wxPython0
those are the wxPython 2.4

and if you installed correctly the 2.6 you must have a wx.pth file and a
wx-* directory in your python site-package. If so, try import wx and see
if it work.

Ricardo

Hello!

Starting with 2.5.3.0 wxpython support multiversions ... Read this
http://wiki.wxpython.org/index.cgi/MultiVersionInstalls

Just to isolate the problem go to your python
site-package(/usr/lib/python2.3/site-packages) and do a:
  mv wx wx0
  mv wxPython wxPython0
those are the wxPython 2.4

Thanks, this led me pretty straight (well, there were a few corners, but
that's life) to the solution! Basically, I had to recompile wxGTK with a
few new options and to set a few paths, now it works perfectly!

Greets,
-Wojtek

···

--
This is a .signature-virus. If you see this, copy it into your .signature!
If you don't know what a .signature is, you've most probably been
infected by another virus of name Microsoft. In this case, please remove
yourself from my fov or infect yourself with linux :wink: