Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've downloaded wxPython-src-2.9.4.0.tar.bz2 from http://www.wxpython.org; right now I'm trying to follow the build instructions on http://www.wxpython.org/BUILD.html. I've managed to build it using $ python build-wxpython.py --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):

wx.pth
wxPython_common-2.9.4.0-py2.7.egg-info
wxPython_common-2.9.4.1-py2.7.egg-info

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: build-wxpython.py [options]

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  --build_dir=BUILD_DIR
                        Directory to store wx build files. (Not used on
                        Windows)
  --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_make=EXTRA_MAKE
                        Extra args to pass on [n]make's command line.
  --extra_setup=EXTRA_SETUP
                        Extra args to pass on setup.py'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
                        location
  --installdir=INSTALLDIR
                        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
                        wx2.9)
  --wxpy_installdir=WXPY_INSTALLDIR
                        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 build-wxpython.py --install?

share|improve this question
add comment

1 Answer 1

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
add comment

Your Answer

 
discard

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