wxPython and Linux dependencies
14 answers - 559 bytes -

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
Can somebody give me some pointers to get it working .?
Every help is appreciated.
No.1 | | 315 bytes |
| 
Daniel Johnson wrote:
Can somebody give me some pointers to get it working .?
not unless you tell us what happens when you try to run it.
If you're using the same version of Python and wxPython, it sure as heck
should work!
Does anything wxPython work on the RedHat system?
-Chris
No.2 | | 586 bytes |
| 
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.
7/6/06, Christopher Barker <Chris.Barker (AT) noaa (DOT) govwrote:
Daniel Johnson wrote:
Can somebody give me some pointers to get it working .?
not unless you tell us what happens when you try to run it.
If you're using the same version of Python and wxPython, it sure as heck
should work!
Does anything wxPython work on the RedHat system?
-Chris
No.3 | | 2104 bytes |
| 
Daniel Johnson wrote:
Error message "cannot find wx"
Then it isn't installed correctly.
infact I have wxpython in /usr/lib/
Is it in the python site-packages directory?
Here's what I have (Fedora core 4)
~]$ ls /
wx-2.6-gtk2-unicode
wx.pth
wxversion.py
wxversion.pyc
and wx.pth contains:
wx-2.6-gtk2-unicode
I installed it using the rpms given on the wxPython website. Do I need
to set some path or something.
You shouldn't have to, but if the rpm is for a different version of
RedHat than you have, it may not work anyway. If there isn't an rpm for
the version of RedHAT, you can try to build the src.rpm with:
rpmbuild TheFileName.src.rpm
Then look at the last few messages to see were it puts the rpms for you.
7/6/06, Christopher Barker <Chris.Barker (AT) noaa (DOT) govwrote:
>>
>Daniel Johnson wrote:
>Can somebody give me some pointers to get it working .?
>>
>not unless you tell us what happens when you try to run it.
>>
>If you're using the same version of Python and wxPython, it sure as heck
>should work!
>>
>Does anything wxPython work on the RedHat system?
>>
>-Chris
>>
>--
>Christopher Barker, Ph.D.
>
>>
>NAA/R&R/HAZMAT (206) 526-6959 voice
>7600 Sand Point Way NE (206) 526-6329 fax
>Seattle, WA 98115 (206) 526-6317 main reception
>>
>Chris.Barker (AT) noaa (DOT) gov
>>
>
>To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
>For additional commands, e-mail: wxPython-users-help (AT) lists (DOT) wxwidgets.org
>>
>>
No.4 | | 1905 bytes |
| 
Hi,
This may be a simple question for some of you. But after several trials I cannot get it to work alright yet. I hope someone in the mail list can give me some hint. Thanks in advance for the help.
Redhat Linux 7.3 come with Python1.5. To get Python new features, I installed Python2.4.3 at /usr/local/py243. After set the /usr/local/py243/bin in the PATH env var, it worked.
With intention to install the wx package at python default location - which is - to make it easy to import wx later, when I configure, I used
$configure /
Then I follow the following steps to finish the install
$make
$su root
$make install
$ldconfig -v
after installation, there files are correctly installed under directory /, for example, when check one subdir, I can get
$ ls /
libwx_baseud-2.6.so libwx_gtk2ud_core-2.6.so.0
libwx_baseud-2.6.so.0 libwx_gtk2ud_core-2.6.so.0.3.1
libwx_baseud-2.6.so.0.3.1 libwx_gtk2ud_html-2.6.so
libwx_baseud_net-2.6.so libwx_gtk2ud_html-2.6.so.0
libwx_baseud_net-2.6.so.0 libwx_gtk2ud_html-2.6.so.0.3.1
libwx_baseud_net-2.6.so.0.3.1 libwx_gtk2ud_media-2.6.so
libwx_baseud_xml-2.6.so libwx_gtk2ud_media-2.6.so.0
libwx_baseud_xml-2.6.so.0
libwx_baseud_xml-2.6.so.0.3.1 libwx_gtk2ud_xrc-2.6.so
libwx_gtk2ud_adv-2.6.so libwx_gtk2ud_xrc-2.6.so.0
libwx_gtk2ud_adv-2.6.so.0 libwx_gtk2ud_xrc-2.6.so.0.3.1
libwx_gtk2ud_adv-2.6.so.0.3.1 wx
libwx_gtk2ud_core-2.6.so
Everything looks fine so far, but it just does not want to work for me.
$ python
Python 2.4.3 (#1, Jul 5 2006, 11:09:02)
[GCC 2.96 20000731 (Red Hat Linux 7.3 2.96-113)] 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
KeyboardInterrupt
No.5 | | 2294 bytes |
| 
Thanks, I will try this one.
7/6/06, Christopher Barker <Chris.Barker (AT) noaa (DOT) govwrote:
Daniel Johnson wrote:
Error message "cannot find wx"
Then it isn't installed correctly.
infact I have wxpython in /usr/lib/
Is it in the python site-packages directory?
Here's what I have (Fedora core 4)
~]$ ls /
wx-2.6-gtk2-unicode
wx.pth
wxversion.py
wxversion.pyc
and wx.pth contains:
wx-2.6-gtk2-unicode
I installed it using the rpms given on the wxPython website. Do I need
to set some path or something.
You shouldn't have to, but if the rpm is for a different version of
RedHat than you have, it may not work anyway. If there isn't an rpm for
the version of RedHAT, you can try to build the src.rpm with:
rpmbuild TheFileName.src.rpm
Then look at the last few messages to see were it puts the rpms for you.
--
7/6/06, Christopher Barker <Chris.Barker (AT) noaa (DOT) govwrote:
>>
>Daniel Johnson wrote:
>Can somebody give me some pointers to get it working .?
>>
>not unless you tell us what happens when you try to run it.
>>
>If you're using the same version of Python and wxPython, it sure as
heck
>should work!
>>
>Does anything wxPython work on the RedHat system?
>>
>-Chris
>>
>--
>Christopher Barker, Ph.D.
>
>>
>NAA/R&R/HAZMAT (206) 526-6959 voice
>7600 Sand Point Way NE (206) 526-6329 fax
>Seattle, WA 98115 (206) 526-6317 main reception
>>
>Chris.Barker (AT) noaa (DOT) gov
>>
>
>To unsubscribe, e-mail: wxPython-users-unsubscribe (AT) lists (DOT) wxwidgets.org
>For additional commands, e-mail:
wxPython-users-help (AT) lists (DOT) wxwidgets.org
>>
>>
>
>
No.6 | | 1411 bytes |
| 
Christopher Barker wrote:
Daniel Johnson wrote:
>Error message "cannot find wx"
Then it isn't installed correctly.
>infact I have wxpython in /usr/lib/
Is it in the python site-packages directory?
Here's what I have (Fedora core 4)
~]$ ls /
wx-2.6-gtk2-unicode
wx.pth
wxversion.py
wxversion.pyc
and wx.pth contains:
wx-2.6-gtk2-unicode
>I installed it using the rpms given on the wxPython website. Do I need
>to set some path or something.
You shouldn't have to, but if the rpm is for a different version of
RedHat than you have, it may not work anyway.
The other thing to check is to be sure that the python that you run is
the one that uses the site-packages dir that wxPython is installed into.
It is possible to have more than one version of Python installed, but
they will each have their own standard library dir and will not look at
the others.
For example, if you installed the py24 version of wxPython RPMs then
they will be installed to /, but if you
are running Python 2.3 or some other version then it will not find the
wxPython modules and will give you that error message.
Try running "python2.4" instead of just "python" and see if that fixes
it for you.
No.7 | | 1017 bytes |
| 
Lei Li wrote:
Hi,
This may be a simple question for some of you. But after several trials
I cannot get it to work alright yet. I hope someone in the mail list can
give me some hint. Thanks in advance for the help.
Redhat Linux 7.3 come with Python1.5. To get Python new features, I
installed Python2.4.3 at /usr/local/py243. After set the
/usr/local/py243/bin in the PATH env var, it worked.
With intention to install the wx package at python default location -
which is - to make it easy to
import wx later, when I configure, I used
$configure /
Then I follow the following steps to finish the install
$make
$su root
$make install
$ldconfig -v
after installation, there files are correctly installed under directory
/,
[]
Everything looks fine so far, but it just does not want to work for me.
Because all you've built and installed so far is the wxWidgets
libraries. You still need to build and install wxPython. See
No.8 | | 1253 bytes |
| 
Daniel Johnson wrote:
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 / I could NT 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
N other files.
So / has only one folder called
"wx-2.6-gtk2-unicode" and a file called " wx.pth" and another file
wx.version.py <http://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 ?
1: Remove the wxPython packages you have installed, and then
either find or build a set of wxPython packages for Python 2.3 and
install those.
2: Install Python 2.4, and also any other Python modules that you
depend on.
No.9 | | 2497 bytes |
| 
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 / I could NT 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 N
other files.
So / 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.
7/6/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:
Christopher Barker wrote:
Daniel Johnson wrote:
>Error message "cannot find wx"
>
Then it isn't installed correctly.
>
>infact I have wxpython in /usr/lib/
>
Is it in the python site-packages directory?
Here's what I have (Fedora core 4)
~]$ ls /
wx-2.6-gtk2-unicode
wx.pth
wxversion.py
wxversion.pyc
and wx.pth contains:
wx-2.6-gtk2-unicode
>
>I installed it using the rpms given on the wxPython website. Do I need
>to set some path or something.
>
You shouldn't have to, but if the rpm is for a different version of
RedHat than you have, it may not work anyway.
The other thing to check is to be sure that the python that you run is
the one that uses the site-packages dir that wxPython is installed into.
It is possible to have more than one version of Python installed, but
they will each have their own standard library dir and will not look at
the others.
For example, if you installed the py24 version of wxPython RPMs then
they will be installed to /, but if you
are running Python 2.3 or some other version then it will not find the
wxPython modules and will give you that error message.
Try running "python2.4" instead of just "python" and see if that fixes
it for you.
No.10 | | 627 bytes |
| 
Daniel Johnson wrote:
Robin,
When I try to remove using
rpm -i wxPyhon
I get a message that wxPython is not installed.
Do this to see a list of wxPython packages installed:
rpm -qa | grep wxPython
Then put each of those package names on a command line with "rpm -e" to
remove them.
Can we get rpm for python 2.4 ? the site I only see tarballI
am a newbie so not much experienced.
Some Python 2.4 RPMs are at
, although since you
are using a custom distro they may not work out of the box. But you
should be able to build a binary RPM from the *.src.rpm.
No.11 | | 1123 bytes |
| 
Daniel Johnson wrote:
Installing python 2.4 from
<>
worked out of the box. But I had to pass the command like python2.4
Project.py
i.e python 2.3 is still the default version. How can I make python 2.5
the default one.
Look at /usr/bin/python* and you'll probably see python, python2.3 and
python2.4, and that python and python2.3 are exactly the same size.
This is because python is a hard-link to python2.3. So you can make
python2.4 be the default by removing that link and making a new one that
links to python2.4. However I would caution against that. If there are
any other packages on the system that use Python they may be depending
on it being the 2.3 version and may break if you change the link.
Instead you can just put the following as the first line in your Project.py:
#!/usr/bin/python2.4
And then make Project.py be executable:
chmod +x Project.py
Then you can run the program directly without specifying python on the
command line, and the #! on the first line will cause it to
automatically use python2.4.
No.12 | | 965 bytes |
| 
Installing python 2.4 from
worked out of the box. But I had to pass the command like python2.4
Project.py
i.e python 2.3 is still the default version. How can I make python 2.5 the
default one.
Thanks Robin, your help has been great.
7/7/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:
Daniel Johnson wrote:
Robin,
When I try to remove using
rpm -i wxPyhon
I get a message that wxPython is not installed.
--
Do this to see a list of wxPython packages installed:
rpm -qa | grep wxPython
Then put each of those package names on a command line with "rpm -e" to
remove them.
--
Can we get rpm for python 2.4 ? the site I only see tarballI
am a newbie so not much experienced.
Some Python 2.4 RPMs are at
, although since you
are using a custom distro they may not work out of the box. But you
should be able to build a binary RPM from the *.src.rpm.
No.13 | | 1572 bytes |
| 
Robin,
When I try to remove using
rpm -i wxPyhon
I get a message that wxPython is not installed.
Can we get rpm for python 2.4 ? the site I only see tarballI am a
newbie so not much experienced.
Thanksyou.
7/7/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:
Daniel Johnson wrote:
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 / I could NT 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
N other files.
So / has only one folder called
"wx-2.6-gtk2-unicode" and a file called " wx.pth" and another file
wx.version.py <http://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 ?
1: Remove the wxPython packages you have installed, and then
either find or build a set of wxPython packages for Python 2.3 and
install those.
2: Install Python 2.4, and also any other Python modules that you
depend on.
No.14 | | 1244 bytes |
| 
Thanks Robin, It works like a charm!!!
7/7/06, Robin Dunn <robin (AT) alldunn (DOT) comwrote:
Daniel Johnson wrote:
Installing python 2.4 from
<
worked out of the box. But I had to pass the command like python2.4
Project.py
i.e python 2.3 is still the default version. How can I make python 2.5
the default one.
Look at /usr/bin/python* and you'll probably see python, python2.3 and
python2.4, and that python and python2.3 are exactly the same size.
This is because python is a hard-link to python2.3. So you can make
python2.4 be the default by removing that link and making a new one that
links to python2.4. However I would caution against that. If there are
any other packages on the system that use Python they may be depending
on it being the 2.3 version and may break if you change the link.
Instead you can just put the following as the first line in your
Project.py:
#!/usr/bin/python2.4
And then make Project.py be executable:
chmod +x Project.py
Then you can run the program directly without specifying python on the
command line, and the #! on the first line will cause it to
automatically use python2.4.
--