19.01.2009
Installing wxPython from the sources is not very complicated, but there are some issues you must take care of, so here we go:
…from WxPython.org
Assumed that you already have installed python and gtk+, untar into a directory. Assume here /usr/src/wxPython-src-2.8.9.2
Create a new folder inside this called bld.
cd /usr/src/wxPython-src-2.8.9.2/bld ../configure --enable-unicode --prefix=/opt/wx/2.8
It's important to go to other directories and compile also as shown here (otherwise you'll get many long lines of errors in the next step). For this, put the following inside a text document called .make and set execute bit on it (chmod +x .make)
make $* \ && make -C contrib/src/gizmos $* \ && make -C contrib/src/stc $*
Next compile and install:
./.make ./.make install
After building, you'll have a set of wxWidgets files in /opt/wx/2.8
…of your python installation (e.g. /usr/local/lib/python2.6/site-packages/)
Just make sure that you call here the right python executable (if you have many python versions, call the one you install for - e.g. python2.6)
cd ../wxPython ← this is inside source folder (wxPython-src-2.8.9.2 in our example) python2.6 setup.py install WX_CONFIG=/opt/wx/2.8/bin/wx-config UNICODE=1 BUILD_GLCANVAS=0
python ← opens the interactive shell (or ipython if available) import wx wx.version()
If you get errors, check to have LD_LIBRARY_PATH set to /opt/wx/2.8/lib.
export LD_LIBRARY_PATH=/opt/wx/2.8/lib