Like any other complex piece of software, wxPython requires other software in order to function properly. Obviously you'll need Python itself, but if you're reading this you've probably already got Python and are just here looking for the best GUI toolkit available for Python. Check out the details for your platform of choice here:
Mac OS X
NOTE: The links below are for the binaries and source for wxPython 18.104.22.168. Prior versions are available at SourceForge.
NOTE 2: wxPython now supports having more than one wxPython runtime installed at the same time, and provides a mechanism for choosing a non-default version at runtime if the app needs to. Please read MultiVersionInstalls for all the gory details.
The Win32 version of wxPython is distributed as a set of standard self-installing executables. This allows you the convenience of using the Start Menu and Add/Remove Programs just like any other Windows software.
There are two versions of wxPython for each of the supported Python versions on Win32. They are nearly identical, except one of them has been compiled with support for the Unicode version of the platform APIs. If you don't know what that means then you probably don't need the Unicode version, get the ANSI version instead. The Unicode verison works best on Windows NT/2000/XP. It will also mostly work on Windows 95/98/Me systems, but it is based on a Microsoft hack called MSLU (or unicows.dll) that translates unicode API calls to ansi API calls, but the coverage of the API is not complete so there are some difficult bugs lurking in there.
If you have a need to compile other Python extension modules or applications that link with the same version of the wxWidgets DLL that wxPython does, then you will want to get the development package. It includes a snapshot of the wx headers and the import libraries found on my system when I made the wxPython binaries.
Mac OS X|
The Max OSX version of wxPython is distributed as a set of mountable disk images. The runtime verisons contain Installer packages, as well as a script that can perform an uninstall of previous installs of wxPython. (NOTE: If you have versions prior to 22.214.171.124 installed please do run the uninstaller to remove the older version.)
Not sure if you should use the ANSI or Unicode version? Read here for more info.
Using Tiger and Python 2.3? You must install this fix before installing wxPython if you haven't already.
Got an Intel Mac? Universal Binaries for Tiger are available below. You will need the Universal MacPython available from Python.org to run this build. As for why they only run on Tiger, please see this note.
Several flavors of wxPython RPMs are available for various RPM based Linux distributions. If there isn't a set of RPMs below for your particular distro and Python version then you can try one of them that is similar to your distro as they will often work. Otherwise there is a source RPM (as well as a source tarball and an RPM spec file) that will allow you to build your own set of RPMs.
Debian users can get wxPython from the Debian pacakge distribution system and can be installed with apt-get. Look for packages named python-wxgtkX.Y where X.Y is the major version numbers.
NOTE: The wxPython packages in Debian 'stable' are way behind the times, so you'll want to look at either 'testing' or 'unstable' for newer pacakges. Alternatively you can build your own Debian packages from sources if you have the necessary tools and libs installed on your system. You can either do it from the source RPM using alien, as described here, or you can build directly from the source tarball. (Instructions still to be written...)
# wxPython repository on Starship deb http://starship.python.net/crew/robind/wxPython/apt/ binary/ deb-src http://starship.python.net/crew/robind/wxPython/apt/ source/After the repository info has been added to /etc/apt/sources.list you can fetch and install the packages using one of the GUI package manager tools such as Synaptic or Adept, or by running the following commands from a terminal window:
sudo apt-get update sudo apt-get install python-wxgtk2.6 python-wxtools wx2.6-i18nThese packages (and their dependencies) will replace earlier versions of wxPython and wxGTK that may have been installed previously from the Ubuntu repositories.
This is the wxWidgets/wxPython documentation, in HTML format. For other documentaion options see the wxWidgets site.
Thre is an effort underway to create a Python-specific set of reference docs for wxPython. While much of the content is not yet present, the docs are still usable, and in fact helpful since they already accurately document what classes and methods are present in wxPython and what the parameter names are. A downloadable archive of the new docs is now made as part of the release builds, and it can also be accessed online here.
Demo and Sample Apps|
Since the RPMs no longer include the demo or samples, it is now packaged separately. Why did I do this? Well the demo is intended to be a learning tool, but when installed from the RPM all the demo files are owned by root. As a separate tarball you can put the files where ever you want and since they'll be owned by you when you untar them you can play and tweak to your heart's desire.
Here are the wxPython sources and all you'll need (besides the prerequisites outlined above) to build wxPython on Win32, Unix or OS X systems, including the sources for wxWidgets (Win32, GTK or OS X.)
If you want to build an RPM for your system then please read the begining of the spec file about some options that can be set on the rpmbuild command line. For example, to build a set of RPMs for gtk1, ansi, and python 2.3 you can use this command:
rpmbuild -ta --define 'pyver 2.3' \ --define 'port gtk' \ --define 'unicode 0' \ wxPython-src-126.96.36.199.tar.bz2
To get your copy of the source code, simply run these commands, (assumes the command-line version of CVS, if you are using WinCVS or other GUI version, adapt accordingly.) When prompted for a password, type "anoncvs" (the same as the user name.)
set CVSROOT=:pserver:firstname.lastname@example.org:/pack/cvsroots/wxwidgets (or whatever you need to do to set an environment variable in your shell) cvs login cvs co wxWidgets
You will find the wxPython sources in the wxWidgets/wxPython directory. When you want to update your copy of the sources, simply change to the wxWidgets directory and run