Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've downloaded wxPython-src- from; right now I'm trying to follow the build instructions on I've managed to build it using $ python --install without errors so far. The problem is I can't run it: import wx will return ImportError: No module named wx, everytime..

My system has multiple Pythons using virtualenvs. After running the build these files can be found together with other packages which I use on a usual basis (in my site-packages folder):


I suspect that I've installed it in the wrong location somehow, and I need to specify the location before building it. But I don't know how.

This is the build options:

Usage: [options]

  --version             show program's version number and exit
  -h, --help            show this help message and exit
                        Directory to store wx build files. (Not used on
  --clean               Clean files from build directories.  Default is all
                        build files. Specify 'wx' to clean just the wx build,
                        'py' for just the wxPython build, and 'pyext' for just
                        the built extension modules.
  --debug               Build wxPython with debug symbols
                        Extra args to pass on [n]make's command line.
                        Extra args to pass on's command line.
  --force_config        Run configure when building even if the script
                        determines it's not necessary.
  --install             Install the built wxPython into installdir or standard
                        Directory to install wxWidgets to.
  --mac_framework       Build wxWidgets as a Mac framework.
  --mac_lipo            EXPERIMENTAL: Create a universal binary by merging a
                    PPC and Intel build together.
  --no_config           Turn off configure step on autoconf builds
  --osx_cocoa           Build the OS X Cocoa port on Mac (experimental)
  --prefix=PREFIX       Prefix value to pass to the wx build.
  --reswig              Allow SWIG to regenerate the wrappers
  --unicode             Build wxPython with unicode support (always on for
                        Directory to install the wxPython binaries.

Can someone explain to me: what's the difference between --build_dir=BUILD_DIR, --installdir=INSTALLDIR and --wxpy_installdir=WXPY_INSTALLDIR?

Which other parameters should I include to $ python --install?

share|improve this question
up vote 1 down vote accepted

D'oh! After REALLY reading the descriptions in the build options, I realized how silly this question is! --build_dir is to store files needed for compiling, --installdir is the location to install wxWidgets, --wxpy_installdir is for wxPython binaries - each already mentioned very clearly in the build options! My inexperience with source-compiling is so apparent..

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.