Getting started using wxPython with Ubuntu (http://www.ubuntulinux.org) is relatively straightforward and painless. This document describes the procedure needed to go from a standard Ubuntu Hoary distribution (as of 2005 February 26) to using wxPython, although a similar procedure should work for any Ubuntu (or Debian) installation.
Ubuntu's package management system is called "apt". In a terminal window, type "sudo apt-get update" and then press enter and provide your password. This command will cause "apt" to fetch the most up-to-date package listings from its package repositories. Once this is done, type "sudo apt-get install wxpython2.5.3" and then press enter. This command will search the package repositories and install the wxpython2.5.3 package. If "apt-get" complains about not being able to find the wxpython2.5.3 package, then try adding the "universe" repository to your list of package repositories and running the above commands again. You can add the "universe" repository by following the instructions found at http://ubuntuforums.org/showthread.php?t=15987.
To check that everything has gone as planned, start a Python shell in a terminal window, import wx, and check the value of wx.VERSION.
Installing wxPython 126.96.36.199 on Hoary
- I am using Hoary, so I am not sure if the following works on your version of Ubuntu.
Most of the steps written below are taken from http://www.bitpim.org/developer.html
1) Using Synaptic or apt-get, install libgtk2.0-dev, freeglut3-dev and python2.4-dev.
Using apt-get: sudo apt-get install libgtk2.0-dev freeglut3-dev python2.4-dev
2) Download wxPython source RPM:
3) sudo rpmbuild --rebuild --define 'pyver 2.4' wxPython2.6-188.8.131.52-1.src.rpm
(This step will take some time to complete)
4) cd /usr/src/rpm/RPMS/i386
5) Convert RPM to deb:
sudo alien wxPython2.6-gtk2-unicode-184.108.40.206-1.i386.rpm
6) Install the package:
sudo dpkg -i wxpython2.6-gtk2-unicode_220.127.116.11-2_i386.deb 7) If you installed a previous version of wxPython before, there is one extra step required: we must inform Python about the new wxPython version; we will modify wx.pth:
a) cd /usr/lib/python2.4/site-packages
b) sudo gedit wx.pth
c) In the first line, write:
wx-2.6-gtk2-unicode d) to test: run python, import wx and write wx.VERSION