By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,548 Members | 1,550 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,548 IT Pros & Developers. It's quick & easy.

wxPython and Linux dependencies

P: n/a
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.

Jul 6 '06 #1
Share this Question
Share on Google+
8 Replies


P: n/a
"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.

di********@gmail.com wrote:
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.
Jul 6 '06 #2

P: n/a
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.

Nick Vatamaniuc wrote:
"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.

di********@gmail.com wrote:
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.
Jul 6 '06 #3

P: n/a
di********@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?
Jul 6 '06 #4

P: n/a
How can we find that it is not using the right version of Python ?

John Salerno wrote:
di********@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?
Jul 6 '06 #5

P: n/a
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.

di********@gmail.com wrote:
How can we find that it is not using the right version of Python ?

John Salerno wrote:
di********@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?
Jul 6 '06 #6

P: n/a

<di********@gmail.comwrote in message
news:11**********************@s16g2000cws.googlegr oups.com...
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!
Jul 7 '06 #7

P: n/a
Nick Vatamaniuc wrote:
To see where Python is looking for libraries open an interactive Python
prompt and type
>>>import sys
print sys.path
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.)
Jul 7 '06 #8

P: n/a
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.

di********@gmail.com wrote:
How can we find that it is not using the right version of Python ?

John Salerno wrote:
di********@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?
Jul 7 '06 #9

This discussion thread is closed

Replies have been disabled for this discussion.