wxPython and Linux dependencies

diffuser78 at gmail.com diffuser78 at gmail.com
Fri Jul 7 11:22:03 EDT 2006


Let me explain and give you some more details.

When I type "python" at the command prompt it shows the following info.
python 2.3.4 (#Feb 01 2005), GCC 3.4.3 20041212  Red Hat 3.4.3-9.EL4 on
linux2


In /usr/lib/ there are two directories called python 2.3 and python 2.4

In /usr/lib/python2.3/site-packages I could NOT find anything related
to wx and in particular

wx-2.6-gtk2-unicode
wx.pth
wxversion.py
wxversion.pyc


In /usr/lib/python2.4/ there is only one folder called site-packages
and NO other files.

So /usr/lib/python2.4/site-packages/ has only one folder called
"wx-2.6-gtk2-unicode" and a file called " wx.pth" and another file
wx.version.py (and its compiler version wx.version.pyc). wx.pth
contains wx-2.6-gtk2-unicode

So, what my feeling is that I have python 2.3 and wx package is for
2.4. So my installed variant cannot find the wx package.

What is the easiest way from this point on to get my small wxPython app
running ???

Every help is appreciated.



Nick Vatamaniuc wrote:
> John,
> To see where Python is looking for libraries open an interactive Python
> prompt and type
> >>> import sys
> >>> print sys.path
> You will get a list of paths where Python will look for modules. Also
> check to see if you have the PYTHONPATH environment variable set. If
> /usr/lib is not in the path list then Python won't be able to import wx
> from there. To test your wx app, you can append to sys.path the path of
> your wx module then try to import again.
>
> Hope this helps,
> Nick V.
>
>
>
> diffuser78 at gmail.com wrote:
> > How can we find that it is not using the right version of Python ?
> >
> > John Salerno wrote:
> > > diffuser78 at gmail.com wrote:
> > > > Error message "cannot find wx"
> > > >
> > > > infact I have wxpython in /usr/lib/
> > > >
> > > > I installed it using the rpms given on the wxPython website. Do I need
> > > > to set some path or something.
> > >
> > > Could it be that it is trying to use another, pre-installed version of
> > > Python -- one which doesn't have wxPython installed with it?




More information about the Python-list mailing list