wxPython and Linux dependencies

D

diffuser78

Hi,

I wrote a small app using wxPython on a Linux distro called Ubuntu (it
is a debain derivative). I ran it on windows and it just worked
perfectly. Now, when I am trying to install the same app on a different
Linux Distro (Red Hat Linux) I cannot get it to work. This Red Hat
variant is a customized version of Red Hat of a Company where I work.
It uses python 2.3.4.
I installed wxPython and other dependencies mentioned on
http://www.wxpython.org/download.php

Can somebody give me some pointers to get it working .?

Every help is appreciated.
 
N

Nick Vatamaniuc

"cannot get it to work." is pretty broad, you are more likely to get
help if you post an error message or any other details.
 
D

diffuser78

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.
 
J

John Salerno

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?
 
N

Nick Vatamaniuc

John,
To see where Python is looking for libraries open an interactive Python
prompt and typeYou 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.
 
F

Frithiof Andreas Jensen

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.

I vaguely remember that wxWindows changed name to wxWidgets and
wxPython changed convention along the way so that one should do:

"include wx" and reference wx stuff as wx<dot><something> ....

instead of "the old way" of:

"from wxPython include *" and reference as f.ex. wxDialog:

This is from memory, I cannot remember what version of wxPython the
change happened - but I was bitten by it.

Check the versions of wxPython on RedHat and Ubuntu - Ubuntu will
almost certainly be newer than RedHat!
 
J

John Salerno

Nick said:
To see where Python is looking for libraries open an interactive Python
prompt and type

After doing this you will see something like

'C:\\Python24\\lib\\site-packages\\wx-2.6-msw-ansi' (from my system)

in the list, otherwise it isn't finding wxPython. Also, probably just
looking at the version of Python you are using when the interactive
prompt starts up might give you a clue. If it's different than the
version you installed wxPython in, then that's why it isn't finding it.
(But I don't know if the version that the interactive prompt uses is
necessarily the version that will be used to run your program, assuming
you have multiple versions installed, so maybe these methods won't be
perfectly accurate. Not sure how it gets decided which version to use if
you have more than one, especially on Unix systems.)
 
D

diffuser78

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top