Wxpython For Mac

With wxPython software developers can create truly native user interfaces for their Python applications, that run with little or no modifications on Windows, Macs and Linux or other unix-like systems. Getting Started With wxPython#. The wxPython GUI toolkit is a Python wrapper around a C library called wxWidgets.The initial release of wxPython was in 1998, so wxPython has been around quite a long time. WxPython’s primary difference from other toolkits, such as PyQt or Tkinter, is that wxPython uses the actual widgets on the native platform whenever possible. Linux, Windows, Mac OS X: Python, wxPython: wxWindows: A general purpose developer's text editor written in Python/wxPython. It supports python syntax highlighting, auto-ident, auto-completion, classbrowser, and can run scripts from inside the editor. Extensible with plugins written in python. EmacsEditor: Unix/X, Windows, Mac OS: C, Lisp.

  1. Wxpython Mac Tutorial
  2. Wxpython For Mac Os
  3. Wxpython For Mac
  4. Wxpython For Raspberry Pi


  1. How to install wxPython
    1. GNU/Linux - Building from the source

Install Python

The stable release of wxPython requires Python version 2.7. Get it from the official download page.


Installation under windows is especially simple: Run the installer you can get from wxPython and follow the instructions.

Mac OS X

An installer is available on the wxPython site, for both PPC and Intel Macs.

If you wish to build it yourself, you should follow the instruction described here.

A french howto can be found here

If you receive a message about the package being 'damaged and can't be opened', then you need to change the security preference setting that is labeled Allow applications downloaded from: to Anywhere.

GNU/Linux - Redhat

You can find RPMs for Redhat (they are working just fine with Mandrake through), at the address wxPython

GNU/Linux - Debian

wxPython can be installed through apt-get by calling apt-get install python-wxgtk2.8 or apt-get install python-wxgtk2.6, depending on which version you want. You may have to call this with root permissions. The wxPython demo is in the wx-examples package. However, it is advised to install the demo separately, as described at Using wxPython Demo Code.

Try this:

Please note that sometimes older versions of wx are installed by using this method See InstallingOnUbuntuOrDebian for how to get the latest versions with apt-get.

GNU/Linux - Raspbian on Raspberry Pi

wxPython 4.0.7.post2 can be installed and does run on Raspberry Pi's Debian variant, Raspbian. It works on Python 3.4 and up. For install instructions Build wxPython on Raspberry Pi.

GNU/Linux - Gentoo

wxPython can be installed through portage by calling emerge wxPython (notice the capital P). The correct command is actually emerge wxpython (without a capital p) as of 11/28/04.

GNU/Linux - Building from the source

You might also want to build wxPython from the source. You have to do this in three steps:

Installing wxGTK from source

wxGTK is the GTK version of wxWidgets. GTK (Gimp ToolKit) is a graphic library used by Gnome, so it is probably already installed on your Linux box. All you have to do is download the wxGTK source from the wxGTK ftp server. Or the wxWidgets website

  • Untar wxGTK by type the command:
  • Go into the directory:
  • Run the configure script:

You might get some errors here if GTK is not installed or if the include files for GTK are not installed (in a Mandrake distribution, gtk+-devel-1.2.8-6mdk.i586.rpm is the rpm that you want to install)

  • Run the make file:
    • You might get some errors here if yacc or lex are not installed. (in a Mandrake distribution, the right rpms are byacc-1.9-7mdk.i586.rpm and flex-2.5.4a-13mdk.i586.rpm)

You should now have a compiled version of wxGTK. We want to install it and link it into the system.

  • Become superuser:

Your root password is required here.

  • Install wxGTK:
  • Link the library:
  • Exit from superuser mode: Normally, wxGTK is installed but there might be a problem with wxPython:

it is possible that the library is not installed where wxPython is looking for it. ( In a mandrake 7.2 distribution, you want wxGTK to be installed in /usr/lib whereas it is automatically installed in /usr/local/lib) The solution is to create a symbolic link of the library where you want it to be:

  • Go in to the directory where you want the library to be installed:
  • Create a symbolic link to the library:

Installing wxPython from source

  • Download the source code of the last wxPython release:

wxPython website

  • Untar the tarball:
  • go into the directory:
  • Edit the setup.py to choose what you want to install. I suggest that you don't install OGL and GL_CANVAS. by selecting:
  • Build the python module:
  • Become root:

Your root password is required here.

  • Install the module:
  • Exit root mode:
  • Check if the module works:

wxPython is fully installed!

Please note that the most up to date information about installing the new wxPython4 wheels is usually located on the main wxPython website at: https://wxpython.org/pages/downloads/.

Make sure you have recent versions of pip and setuptools installed.

  • Installing wxPython4 (Phoenix) on Linux Since wxPython is not able to be built to the manylinux1 standard we're not able to put binaries on PyPI. Instead binary wheels are made available for a few popular linux distributions, and you can install them using pip once you locate the proper folder to tell pip to download from. Look around in https://extras.wxpython.org/wxPython4/extras/linux for a folder matching your distro and gtk preference. You can then install with a command like the following command. If you are not installing into a Python virtual environment then you will probably need to insert sudo at the beginning of the command:

  • Installing wxPython4 (Phoenix) on Windows and OSX Binary wheels for these platforms are available on PyPI so you can install with this simpler command if build are available for your target Python:

  • Verify installation

Rather than simply deleting this wiki page, I'm marking it as out-of-date until the relevant portions can be updated. In the meantime, if you want more up-to-date info on wxPython on Mac OS X you should see wxPythonOSX Issues


Wxpython Mac Tutorial

For the next week this wiki page will probably be pretty raw, asking as many questions as it answers. Help fill in the answers, point to relevant mailing list posts, web site pages, etc. Then we can point new users to this page once we have the big issues sorted out.



MachoPython 2.2.1 and wxPython Mac 2.3.3 preview builds.



Okay, I need a little help here on the correct terminology for disk images, packages, etc. It seems pretty simple, download the two disk images above. Run the MachoPython package installer (you'll need the admin password). Then run the wxPython Mac package installer (again you'll need the admin password). At this point, both MachoPython and wxPython Mac should be installed and ready to go. How do we have the user verify this is working? Do we need screenshots? Does installation order actually matter? This seems like pretty standard stuff, but I'm too new at this to wordsmith the docs.

Will the wxPython demo be part of the standard distribution? How about documentation? Where will these be located and can the user get to them via the Finder? Should an alias be automatically created in a common user folder that points at the right wxPython folder?

Issues with uninstallaing or overwriting previous installs as new versions are made available?

Fink distribution of MachoPython and wxGTK


It would be nice to cover running wxGTK, pitfalls when wxPython Mac and MachoPython binary above are already installed, etc. I know people using one or the other, but not both.

Bob Ippolito posted: 'I don't recommend using Fink's python, I believe it's compiled to support X11 and not OS X's GUI. It won't conflict with your MachoPythoninstall if you don't have source /sw/bin/init.csh in your .cshrc, otherwise you may have to tweak your path to put /usr/local/bin before /sw/bin in your .cshrc.'

MacPython versus MachoPython

MachoPython is required for the wxPython Mac binary.

Issues with having MacPython and MachoPython installed? By default both installers create /Applications/Python.app. Perhaps moving the MacPython version away before installing MachoPython would work?

Using MacPython IDE as a Python script editor.

Build Instructions

Build instructions by Frank Vercruesse for wxPython Mac.

Running a script by double-clicking in the Finder

Wxpython For Mac Os

You need to associate .py and .pyw files in the Finder. In the Finder, do a 'Get Info' on a .py file. Choose the 'Open with application' pane and you can set it for all *.py files. Repeat for .pyw files.

Wxpython for mac installer

Need additional discussion and/or link to mailing list messages on the topics below:

Bill Bumgarner's PythonLauncher http://mail.python.org/pipermail/pythonmac-sig/2002-April/005533.html

pythonw shell script (probably need some explanation here)

limitations of running multiple scripts ???

Running a script in the Terminal

You can also run a script from the Terminal command-line.

Note that output from stdout (e.g. print statments) and stderr (e.g. tracebacks) will go to the Console. Both the Terminal and Console apps are in Utilities folder under Applications in the Finder.

The default Terminal shell is tcsh. The default system shell is zsh; there is also a symlink for sh that points to zsh.

Question: Does this mean that if you want to modify the PYTHONPATH that you'll need an additional .login or something besides .cshrc so that you can make PYTHONPATH changes like:

In other words, where should settings be made so that user environment variables are valid for both the Terminal and when running something from the Finder?

Need to add info about alternative invocations, passing command-line arguments to the script, etc.

Editing Python scripts

Mailing Lists

The main place to follow the updates of wxPython Mac are in the archives of the mailing lists

  • wxPython-mac mailing list

Additional Information

The wxPython Frequently Asked Questions page may have additional information.

Known Bugs

Wxpython For Mac

Wxpython For Mac

Should we keep a running list here, use SourceForge tracker, the mailing list, or something else?

  • [SDD] Several (most) of the wxPython demo programs die. Where is the page describing how to help debug this?
  • [KEA] I've created a working scratchpad wxPython Mac and PythonCard Issues page to track progress of work on OS X.

Wxpython For Mac


  • [KEA] Kevin Altis
  • [SDD] Seth Delackner
  • [JDB] Jed Burgess

Revision History

Wxpython For Raspberry Pi

  • [JDB] 2003-03-11 fixed link to mailing list archive
  • [KEA] 2002-04-28 added link to wxPython Mac and PythonCard Issues

  • [KEA] 2002-04-27 created this page