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


  • download
         
  • MS Windows
  • Mac OSX
  • Linux
  • Source
  • Build instructions


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


  • 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, but on Jaguar you'll need to get the MacPython installer from Jack's MacPython page.

    • Note to Fink users: Versions of Python installed by Fink cannot run wxPython (unless you install and run X11...). You need to use Apple's Framework builds, or a third-party Framework build.

    • Python 2.4 Framework builds are available for download from the undefined.org MacPython site. ActiveState also distributes a Framework build.

    Prebuilt Binaries

    NOTE: The links below are for the binaries and source for wxPython 2.6.3.3. 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.

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

      Python 2.3 Python 2.4 Python 2.5
    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-ansi
    win32-unicode
    win32-ansi
    win32-unicode
    win32-ansi
    win32-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.

    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.

    PPC Binaries

      OSX 10.3 PPC OSX 10.4 universal
    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-py2.3
    osx-unicode-py2.4

    osx-ansi-py2.3
    osx-ansi-py2.4

    osx-unicode-py2.4
    osx-unicode-py2.5

    osx-ansi-py2.4
    osx-ansi-py2.5

    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-py2.3

    osx-docs-demos-py2.4

    osx-docs-demos-py2.4

    osx-docs-demos-py2.5

    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 (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

    RedHat 9, Python 2.3
    common-gtk2-ansi
    common-gtk2-unicode

    RedHat 9, Python 2.4
    common-gtk2-ansi
    common-gtk2-unicode

    Fedora Core 2, Python 2.3
    common-gtk2-ansi
    common-gtk2-unicode

    Fedora Core 4, Python 2.4
    common-gtk2-ansi
    common-gtk2-unicode

    Mandrake 10.2, Python 2.4
    common-gtk2-ansi
    common-gtk2-unicode

    Mandriva 2006, Python 2.4
    common-gtk2-ansi
    common-gtk2-unicode

    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
    RedHat 9, Python 2.3
    gtk2-ansi
    gtk2-unicode

    RedHat 9, Python 2.4
    gtk2-ansi
    gtk2-unicode

    Fedora Core 2, Python 2.3
    gtk2-ansi
    gtk2-unicode

    Fedora Core 4, Python 2.4
    gtk2-ansi
    gtk2-unicode

    Mandrake 10.2, Python 2.4
    gtk2-ansi
    gtk2-unicode

    Mandriva 2006, Python 2.4
    gtk2-ansi
    gtk2-unicode

    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.

    RedHat 9, Python 2.3
    devel-gtk2-ansi
    devel-gtk2-unicode

    RedHat 9, Python 2.4
    devel-gtk2-ansi
    devel-gtk2-unicode

    Fedora Core 2, Python 2.3
    devel-gtk2-ansi
    devel-gtk2-unicode

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

    Mandrake 10.2, Python 2.4
    devel-gtk2-ansi
    devel-gtk2-unicode

    Mandriva 2006, Python 2.4
    devel-gtk2-ansi
    devel-gtk2-unicode

    Debian

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

    Ubuntu

    There is a set of packages maintained by the wxPython team for Ubuntu 6.06 (Dapper Drake) for i386 based systems. You can get them by adding the following to your /etc/apt/sources.list file:

        # 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-i18n
    
    These packages (and their dependencies) will replace earlier versions of wxPython and wxGTK that may have been installed previously from the Ubuntu repositories.
    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.6.3.3.tar.bz2
    


    Development Sources
    You can also get access to the source tree from the wxWidgets CVS 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 CVS and to get the CVS programs, go to the CVS Home.

    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:anoncvs@cvs.wxwidgets.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

        cvs update
    


    SourceForge Logo