module wx not found

Hello all,

I am installing wxpython 2.8.10 on a centos 5.4 x86_64 system. I build

wxWidgets and install in /usr/local/lib. I then build and install

wxPython by following the installation instructions that come with the

tarball. That is, I do a:

python setup.py install

from the wxPython subdirectory. My version of python is 2.4.3 (came

with the system). when I do an import wx I get the following problem.

[semeraro@cherokee ~]$ python

Python 2.4.3 (#1, Sep 3 2009, 15:37:37)

[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

import wx

Traceback (most recent call last):

File “”, line 1, in ?

ImportError: No module named wx

looking in /usr/lib/python2.4/site-packages shows:

[semeraro@cherokee ~]$ ls /usr/lib/python2.4/site-packages

Alacarte dogtail pirut svn

aotcompile.py elementtree rpmUtils urlgrabber

aotcompile.pyc GMenuSimpleEditor setroubleshoot wx.pth

aotcompile.pyo gmenu.so _snackmodule.so wxversion.py

classfile.py iniparse snack.py wxversion.pyc

classfile.pyc invest snack.pyc yum

classfile.pyo libsvn snack.pyo

cracklibmodule.so libusermodule.so sos

wx.pth contains “wx-2.8-gtk2-unicode” but as you can see there is no

such directory in /usr/lib/python2.4/site-packages. It is in

/usr/lib64/python2.4/site-packages instead. Is the install script

doing what it is supposed to be doing in this case?

Dave

Nope. At least the wx.pth file should also be going to the /usr/lib/python2.4/site-packages folder. If you can figure out how to make setup.py automatically know how to do that then please send me a patch.

···

On 1/13/10 6:55 AM, Dave Semeraro wrote:

   Hello all,

   I am installing wxpython 2.8.10 on a centos 5.4 x86_64 system. I build
   wxWidgets and install in /usr/local/lib. I then build and install
   wxPython by following the installation instructions that come with the
   tarball. That is, I do a:

> python setup.py install

   from the wxPython subdirectory. My version of python is 2.4.3 (came
   with the system). when I do an import wx I get the following problem.

   [semeraro@cherokee ~]$ python
   Python 2.4.3 (#1, Sep 3 2009, 15:37:37)
   [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
   Type "help", "copyright", "credits" or "license" for more information.
>>> import wx
   Traceback (most recent call last):
    File "<stdin>", line 1, in ?
   ImportError: No module named wx

   looking in /usr/lib/python2.4/site-packages shows:

   [semeraro@cherokee ~]$ ls /usr/lib/python2.4/site-packages
   Alacarte dogtail pirut svn
   aotcompile.py elementtree rpmUtils urlgrabber
   aotcompile.pyc GMenuSimpleEditor setroubleshoot wx.pth
   aotcompile.pyo gmenu.so _snackmodule.so wxversion.py
   classfile.py iniparse snack.py wxversion.pyc
   classfile.pyc invest snack.pyc yum
   classfile.pyo libsvn snack.pyo
   cracklibmodule.so libusermodule.so sos

   wx.pth contains "wx-2.8-gtk2-unicode" but as you can see there is no
   such directory in /usr/lib/python2.4/site-packages. It is in
   /usr/lib64/python2.4/site-packages instead. Is the install script
   doing what it is supposed to be doing in this case?

--
Robin Dunn
Software Craftsman