Home
     
  • Introduction
  • Quotes
  • Screen shots
  • Learning wxPython
  • Recent Changes
  • Migration Guide
  • Slice of Py
  • Online wxDocs
  • New wxPyDocs
  • Presentations
  • Buy the Book
  • Book Errata
  • Get the T-shirt
  • Search this site


  • download
         
  • Prerequisites
  • Binaries
  • Source code
  • SVN access
  • Build instructions


  •      
  • wxPyWiki
  • wxForty-Two
  • Mail lists
  • List archives
  • ASPN Archive
  • Browse sources
  • Report a bug
  • Submit a patch
  • Feature Request
  • Contribute
  • Support
  • Code guidelines


    wxPython in Action


  • Prerequisites
    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:

    Win32

    • If you have a modern up to date version of Windows and use the binary installer for wxPython found below, you probably don't need anything else.

    • If your tree controls have strange background colors, try loading this MS Common Controls Update as wxWidgets does something that causes a bug in one of the older versions to manifest itself. Another way to get this update is to install Internet Explorer or MS Office apps, so if the system has those already then you probably don't need to worry about this.

    • wxPython's wx.glcanvas.GLCanvas class only provides the GL Context and a wx.Window to put it in, so if you want to use the wxGLCanvas you will also need the PyOpenGL Python extension modules as well.

    • Windows 95 users will probably also need the following items to update their systems:


    Linux/Unix/Etc.

    • The first thing you'll need are the glib and gtk+ libraries. Before you run off and download the sources check your system, you probably already have it. Most distributions of Linux come with it and you'll start seeing it on many other systems too now that Sun and others have chosen GNOME as the desktop of choice. If you don't have glib and gtk+ already, you can get the sources here. Build and install them following the directions included.

    • In order to use the wxGLCanvas you'll need to have either OpenGL or the Mesa3D library on your system. wxPython's wx.glcanvas.GLCanvas only provides the GL Context and a wx.Window to put it in, so you will also need the PyOpenGL Python extension modules as well, if you want to use OpenGL.

      If you are building wxPython yourself and don't care to use OpenGL/Mesa then you can easily skip building it and can ignore this step. See the build instructions for details.

    Mac OS X

    • wxPython needs a special Mac OS X-specific build of Python, called a Framework build, in order to work. Panther and Tiger include a Framework build of Python 2.3, or you can get a newer version of Python the Python Framework from the Python site.
    • Note to Fink users: Versions of Python installed by Fink or other unix-like package repositories cannot run wxPython (unless you install and run X11 and use a wxGTK version of wxPython...). You need to use Apple's Framework builds, or a third-party Framework build to be able to have a native Aqua GUI.

    Prebuilt Binaries

    NOTE: The links below are for the binaries and source for wxPython 2.8.9.1. The download page for the previous stable release series is here. Other prior versions (stable or development) are available directly from 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.

    Microsoft Windows

    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. Unless you've been told differently, you probably want to get the Unicode build of wxPython. Although they are not nativly Unicode like NT-based systems, the Unicode build of wxPython will also mostly work on Windows 98/Me systems using a Microsoft hack called MSLU (or unicows.dll) that translates unicode API calls to ansi API calls. However the coverage of the API is not complete so there are some difficult bugs lurking in there, so the best thing to do is to upgrade your machines if possible, otherwise Windows 98/Me users may want to try the ANSI build instead.

      Python 2.3 Python 2.4 Python 2.5 Python 2.6
    wxPython runtime
    Install one or more of these. They each contain:
    • The wxPython extension modules and proxy class modules
    • wxPython library
    • Command-line scripts for some wxPython tools
    win32-unicode
    win32-ansi
    win32-unicode
    win32-ansi
    win32-unicode
    win32-ansi

    win64-unicode
    win32-unicode
    win32-ansi

    win64-unicode
    Docs, Demo, Samples, etc.
    This is optional, but highly recommended for developers. This package is usable with any version of the wxPython runtime, and will use the default version if more than one is installed. It contains:
    • The wxPython demo
    • Several small sample apps
    • Start Menu launchers for the demo and tools such as PyCrust and XRCed
    • The wxWidgets documentaion, in a MS HTMLHelp file
    win32-docs-demos

    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 2.5.3.1 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.

    Got an Intel Mac? All of the wxPython builds for OS X are now Universal Binaries, and will work on OS X 10.3.9 or 10.4.x, PPC or Intel.

    OS X Binaries

      Python 2.4 Python 2.5 Python 2.6
    wxPython runtime
    Install one or more of these. They each contain:
    • The wxPython extension modules and proxy class modules
    • wxPython library
    • Command-line scripts for some wxPython tools
    osx-unicode
    osx-ansi
    osx-unicode
    osx-ansi
    osx-unicode
    osx-ansi
    Docs, Demo, Samples, etc.
    This is optional, but highly recommended for developers. This package is usable with any version of the wxPython runtime, and will use the default version if more than one is installed. It contains:
    • The wxPython demo
    • Several small sample apps
    • App bundles for PyCrust and XRCed
    • The wxWidgets documentaion, bundled in a viewer application
    osx-docs-demos osx-docs-demos osx-docs-demos
    Linux RPMs

    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 below (as well as a source tarball and an RPM spec file) that will allow you to build your own set of RPMs.

    wxPython common

    Install only one of these. They contain the common files that are shared between all versions of wxPython. Even if you do MultiVersionInstalls, you only need one wxPython-common. This RPM contains the wx.pth file which defines which is the default version of wxPython, so switching defaults is as easy as installing a different wxPython-common RPM.

    These RPMs each contain the following:

    • The wx.pth file which selects the default version of wxPython
    • The wxselect.py module
    • A set of command-line scripts for launching the wxPython tools
    • KDE and GNOME menu items for launching the wxPython tools

    Fedora Core 6, Python 2.4
    common-gtk2-unicode
    common-gtk2-ansi
    Fedora Core 7, Python 2.5
    common-gtk2-unicode
    common-gtk2-ansi
    wxPython runtime

    Install one or more of these. They each contain a version of the wxPython runtime that supports MultiVersionInstalls, and includes:

    • The wxPython extension modules and proxy class modules
    • The wxPython library
    • The wxWidgets shared libraries
    Fedora Core 6, Python 2.4
    gtk2-unicode
    gtk2-ansi

    Fedora Core 7, Python 2.5
    gtk2-unicode
    gtk2-ansi

    wxPython devel

    These packages are optional. They include the header files and such that are needed if you need to create extension modules or applications that interact with the wxPython extensions modules or link with the same version of wxWidgets.

    Fedora Core 6, Python 2.4
    devel-gtk2-unicode
    devel-gtk2-ansi

    Fedora Core 7, Python 2.5
    devel-gtk2-unicode
    devel-gtk2-ansi

    Debian/Ubuntu

    There are wxWidgets and wxPython packages in the standard software repositories for Debian and Ubuntu, but they are usually at least a few releases behind the current release, and in some cases many releases behind. Using your favorite package management tool look for packages named python-wxgtkX.Y where X.Y is the major version numbers for the release series.

    There is also a package repository maintained by the wxWidgets team that will always have up to date pacakges for wxWidgets and wxPython for various Debian and Ubuntu releases. There are instructions for accessing this repository on the wiki.

    You can also do it the old way from the source RPM using alien, as described here, although I'm not sure there is any need to do it that way any more.

    Documentation

    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.

    Source Code
    Released Sources
    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.)

    Be sure to read the BUILD and INSTALL instructions if you are wanting to use the sources to build your own copy of wxPython.

    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-2.8.9.1.tar.bz2
    


    Development Sources
    You can also get access to the source tree from the wxWidgets Subversion (SVN) server. This lets you have instant access to new features and bug fixes as the core wxWidgets/wxPython developers complete their implementaion and check them in to the repository. To learn more about SVN and to get the SVN programs if you don't already have them, go to the
    SVN Home.

    You can browse the source repository, including the history of changes to each file by going to http://svn.wxwidgets.org/viewvc/wx/.

    To get your own copy of the source code from SVN simply run "svn checkout" with one of the following URLs (or any others that will give you the code you want to see.) You'll probably also want to specify a destination directory that makes sense to you.

    Interesting SVN URLs
    URLWhat you get
    http://svn.wxwidgets.org/svn/wx/wxWidgets/trunk/ The main new development branch for wxWidgets 2.9 and beyond
    http://svn.wxwidgets.org/svn/wx/wxPython/trunk/ This is for development of wxPython 2.9
    http://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH/ Maintanence branch for wxWidgets 2.8.x
    http://svn.wxwidgets.org/svn/wx/wxPython/branches/WX_2_8_BRANCH/ Maintenance branch for wxPython 2.8.x

    Once you have a working copy of the code you can modify it and use "svn diff" to make a patch to submit to the patch tracker, or you can use "svn update" to fetch new changes from the repository.


    SourceForge Logo