This site uses cookies to deliver our services and to show you relevant ads and job listings.
By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our Terms of Service.
Your use of Stack Overflow’s Products and Services, including the Stack Overflow Network, is subject to these policies and terms.

Join us in building a kind, collaborative learning community via our updated
Code of Conduct.

7 Answers
7

wxPython is using a legacy script, and according to this technical notebundle installers were deprecated and are (as of El Capitan release) unsupported:

Bundle-style installer packages are a legacy transition aid that is no longer supported. PackageMaker is also no longer supported. It is now necessary to convert to flat-file installer packages using tools like productbuild.

That leaves you with two options,

Convert the installer to a flat package.

Compile wxWidgets and install it locally.

To achieve the former, follow these instructions:

0) Let's assume that you have already mounted the dmg and you have moved the pkg folder to a working place.

cd ~/repack_wxpython
cp -r /Volumes/wxPython/wxPython-ABC.pkg .

1) Use the pax utility to extract the payload file (pax.gz) from Contents/Resources to a folder that will become the root of your new package.

Caveats: The original bundle package contains a License.rtf and a Welcome.txt files that are not included in the flat package. Those need to be added by defining a custom XML file and creating another package using the productbuild command.

Change directories cd /pathToYourGitHubSources/wxPython and run the following command:python build-wxpython.py --build_dir=../bld --osx_cocoa --install

Build and install takes a while. After it is completed, you can try import wx, but may first need the following steps.

Look in the newly created installed_files.txt to see what directories wxPython* files are in, as well as the location of /wx/*.py and /lib/*.pyc files. The three directories are probably like:/usr/lib/python2.7/site-packages/usr/lib/python2.7/site-packages/wx/usr/lib/python2.7/site-packages/wx/lib

If the wx version printed, it's working.
Some systems have other versions of wxPython or vestiges of old wxPythons installed that have led me to need setting the environment as seen above until the old pieces are cleaned off the system.

I posted an answer about building from source and @memoselyk posted a useful answer on how to convert a package to install on newer OSX.
However, I am finding the easy solution is to use the Brew package manager.
Below are the steps I used.

I ran the below commands several times to clean off old installs and make sure I was able to import the correct wx:

sudo pip uninstall wxPython

sudo pip uninstall wxPython-Phoenix

I removed system environment variables added to get some previous installs to work.

unset PYTHONPATH

unset DYLD_LIBRARY_PATH

unset DYLD_FRAMEWORK_PATH

After installing wx you may need to run the following if it was a dirty install:
- brew link --overwrite wxmac
- brew doctor wxPython (and follow the very useful directions if something is detected)

If you want access to other builds, this isn't the method for you, but for the 3.0.2.0 'Classic' release, I think this is the way to go.brew upgrade wxPython would bump up to a newer release, if there ever is one.