Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > wxPython and Linux dependencies

Reply
Thread Tools

wxPython and Linux dependencies

 
 
diffuser78@gmail.com
Guest
Posts: n/a
 
      07-06-2006
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.

 
Reply With Quote
 
 
 
 
Nick Vatamaniuc
Guest
Posts: n/a
 
      07-06-2006
"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.

http://www.velocityreviews.com/forums/(E-Mail Removed) 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.


 
Reply With Quote
 
 
 
 
diffuser78@gmail.com
Guest
Posts: n/a
 
      07-06-2006
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.
>
> (E-Mail Removed) 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.


 
Reply With Quote
 
John Salerno
Guest
Posts: n/a
 
      07-06-2006
(E-Mail Removed) 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?
 
Reply With Quote
 
diffuser78@gmail.com
Guest
Posts: n/a
 
      07-06-2006
How can we find that it is not using the right version of Python ?

John Salerno wrote:
> (E-Mail Removed) 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?


 
Reply With Quote
 
Nick Vatamaniuc
Guest
Posts: n/a
 
      07-06-2006
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.



(E-Mail Removed) wrote:
> How can we find that it is not using the right version of Python ?
>
> John Salerno wrote:
> > (E-Mail Removed) 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?


 
Reply With Quote
 
Frithiof Andreas Jensen
Guest
Posts: n/a
 
      07-07-2006

<(E-Mail Removed)> wrote in message
news:(E-Mail Removed) 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!


 
Reply With Quote
 
John Salerno
Guest
Posts: n/a
 
      07-07-2006
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.)
 
Reply With Quote
 
diffuser78@gmail.com
Guest
Posts: n/a
 
      07-07-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.
>
>
>
> (E-Mail Removed) wrote:
> > How can we find that it is not using the right version of Python ?
> >
> > John Salerno wrote:
> > > (E-Mail Removed) 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?


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wxPython IEHtmlWindow mystery - dependencies? gjzusenet@gmail.com Python 0 05-09-2006 10:10 AM
wxPython IEHtmlWindow mystery - dependencies? gjzusenet@gmail.com Python 0 05-09-2006 10:10 AM
wxPython - wx package (new style wxPython?) Logan Python 5 12-11-2003 04:12 PM
[PY GUI] interest function in python GUI(wxpython,pyqt) program.wxpython,pyqt ulysses Python 4 10-22-2003 03:28 PM
wxPython looses function "wxPython.wx.miscc" Anand Python 1 07-23-2003 01:59 AM



Advertisments