trouble instlaling 2_4_BRANCH (wxGTK, gentoo linux, 2.4.20 kernel)

I'm trying to get wxPython working on my linux box, and I have not had much
success...

I finally got it installed, but whenever I try to use it, I get a weird error:
Python 2.2.2 (#1, Feb 26 2003, 08:58:04)
[GCC 3.2.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/wx/__init__.py", line 45, in ?
    from wxPython import wx
  File "/usr/lib/python2.2/site-packages/wxPython/__init__.py", line 15, in ?
    __version__ = __version__.ver
AttributeError: 'module' object has no attribute 'ver'

I tried to fix it by changing __version__.py to have the following:
ver = wxVERSION

but now I get this:

import wx

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/wxPython/wx.py", line 4, in ?
    from misc import *
  File "misc.py", line 699, in ?
    NewId = miscc.NewId
AttributeError: 'module' object has no attribute 'NewId'

Any ideas?

Thanks,
Nick

nrb23@cornell.edu wrote:

I'm trying to get wxPython working on my linux box, and I have not had much success...

I finally got it installed, but whenever I try to use it, I get a weird error:
Python 2.2.2 (#1, Feb 26 2003, 08:58:04) [GCC 3.2.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/wx/__init__.py", line 45, in ?
    from wxPython import wx
  File "/usr/lib/python2.2/site-packages/wxPython/__init__.py", line 15, in ?
    __version__ = __version__.ver
AttributeError: 'module' object has no attribute 'ver'

I tried to fix it by changing __version__.py to have the following:
ver = wxVERSION

but now I get this:

import wx

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/lib/python2.2/site-packages/wxPython/wx.py", line 4, in ?
    from misc import *
  File "misc.py", line 699, in ?
    NewId = miscc.NewId
AttributeError: 'module' object has no attribute 'NewId'

Any ideas?

It looks to my like your /usr/lib/python2.2/site-packages/wxPython/ may have an older version of (at least some of) the .py files. Double check that the new build actually got installed there. Also make sure that your PYTHONPATH and sys.path only contain the site-packages dir and not also .../site-packages/wxPython.

···

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

It looks to my like your /usr/lib/python2.2/site-packages/wxPython/ may
have an older version of (at least some of) the .py files. Double check
that the new build actually got installed there. Also make sure that
your PYTHONPATH and sys.path only contain the site-packages dir and not
also .../site-packages/wxPython.

It seems that that was the problem, thank you very much!

-Nick