Search code examples
pythonbuilddependencieswxpythoninstallation

Installing wxPython from source under linux


I am trying to install wxPython from source under linux. The steps I followed were:

  1. Download wxPython from http://downloads.sourceforge.net/wxpython/wxPython-src-2.8.12.1.tar.bz2
  2. Run ./configure --prefix=$HOME/Local
    At the end of the configure process the output was:

    Configured wxWidgets 2.8.12 for `x86_64-unknown-linux-gnu'
    
      Which GUI toolkit should wxWidgets use?                 GTK+ 2
      Should wxWidgets be compiled into single library?       no
      Should wxWidgets be compiled in debug mode?             no
      Should wxWidgets be linked as a shared library?         yes
      Should wxWidgets be compiled in Unicode mode?           no
      What level of wxWidgets compatibility should be enabled?
                                           wxWidgets 2.4      no
                                           wxWidgets 2.6      yes
      Which libraries should wxWidgets use?
                                           jpeg               sys
                                           png                sys
                                           regex              sys
                                           tiff               builtin
                                           zlib               sys
                                           odbc               no
                                           expat              builtin
                                           libmspack          no
                                           sdl                no
    
  3. make wxPython, which appears to run without errors.

  4. make install

But when I now try to do import wx in the python console (v2.7), python does not find the module.

So my questions are:

  1. Am I missing some dependencies although wxPython seems to build and install without any errors?
  2. Did I miss anything during the installation process?
  3. How do I make python aware of the new package?

Any hint, link, article is appreciated.


Solution

  • For wxPython 2.8.x, there are complete build from source instructions here:

    http://wxpython.org/BUILD-2.8.html

    If you'd rather go for 2.9, then you can use the following instructions instead: http://wxpython.org/builddoc.php

    If you run into issues, join the wxPython-users mailing list / Google Group here: http://wxpython.org/maillist.php

    Tell them which versions of wxPython and Python you're using along with which Linux and you'll almost certainly get help. There are a lot of Linux guys on there.