wxPython2.5: Module can not be found

Heya Folks,

I just build the latest RPM on my x86_64 platform, using wxPython2.5-2.5.5.1-1_py2.3.src.rpm as source.

When i run my wxPython application it fails with the following error:
> Traceback (most recent call last):
> File "RipperApp.py", line 3, in ?
> from wxPython.wx import \
> ImportError: No module named wxPython.wx

The same happens when i replace that line by:
> Traceback (most recent call last):
> File "RipperApp.py", line 3, in ?
> import wx
> ImportError: No module named wx

Can the problem that the file wx.pth resides in:
> /usr/lib/python2.3/site-packages

Whereas the wx-2.5.5-gtk2-unicode directory resides under:
> /usr/lib64/python2.3/site-packages

Any ideas on how to get the import paths sorted out correctly?

Mazzel,

Martijn.

Martijn Ras wrote:

Heya Folks,

I just build the latest RPM on my x86_64 platform, using wxPython2.5-2.5.5.1-1_py2.3.src.rpm as source.

When i run my wxPython application it fails with the following error:
> Traceback (most recent call last):
> File "RipperApp.py", line 3, in ?
> from wxPython.wx import \
> ImportError: No module named wxPython.wx

The same happens when i replace that line by:
> Traceback (most recent call last):
> File "RipperApp.py", line 3, in ?
> import wx
> ImportError: No module named wx

Can the problem that the file wx.pth resides in:
> /usr/lib/python2.3/site-packages

Whereas the wx-2.5.5-gtk2-unicode directory resides under:
> /usr/lib64/python2.3/site-packages

Probably. Is /usr/lib/python2.3/site-packages in the sys.path or is only /usr/lib64/python2.3/site-packages there?

Any ideas on how to get the import paths sorted out correctly?

The quick and easy way would be to just move wx.pth (and wxversion.py if it is also in the wrong place) to /usr/lib64/python2.3/site-packages. The harder way would be to figure out why setup.py is putting it in the wrong place and fix that...

ยทยทยท

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!