No module named _core

I am trying to use wxPython (the version that ships with Fedora 11 -
I'm not building it from source). The first problem is that when I try
to:

from wxPython.wx import *

I get:
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wxPython/
__init__.py", line 15, in <module>
    import _wx
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wxPython/
_wx.py", line 3, in <module>
    from _core import *
  File "/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode/wxPython/
_core.py", line 15, in <module>
    import wx._core
ImportError: No module named _core

I tried adding:
CODE: SELECT ALL
export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.6/site-packages/wx-2.8-
gtk2-unicode/wxPython:/usr/lib/python2.6/site-packages/wx-2.8-gtk2-
unicode/wx:/usr/lib/python2.6/site-packages/wx-2.8-gtk2-unicode

to my path in .bashrc, but it didn't change anything.

Then I tried:
from wx.glcanvas import *

and got:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named glcanvas

Any suggestions?

Thanks,

Dave

I am trying to use wxPython (the version that ships with Fedora 11 -
I'm not building it from source). The first problem is that when I try
to:

from wxPython.wx import *

Try a simple "import wx". The old wxPython namespace is being phased out and is no longer automatically maintained. It's possible that something got lost along the way or that there is an error in how it is packaged for Fedora.

Then I tried:
from wx.glcanvas import *

and got:
Traceback (most recent call last):
   File "<stdin>", line 1, in<module>
ImportError: No module named glcanvas

The wx.glcanvas module is an optional part of the build so it's possible that Fedora's package maintainer did not include it, or did not use the build flags in wxGTK that would be required for it to be possible to build in wxPython. You may want to contact the package maintainer and ask them about it, or you can get the source RPMs and tweak their .spec files to be able to build your own set of packages.

···

On 2/24/10 3:54 PM, David Doria wrote:

--
Robin Dunn
Software Craftsman