参考
http://wxpython.org/BUILD-2.8.html
http://wiki.wxpython.org/How%20to%20install%20wxPython#How_to_install_wxPython
wxwidgets 下载地址
http://www.wxwidgets.org/downloads
file: http://prdownloads.sourceforge.net/wxwindows/wxWidgets-2.8.12.tar.bz2
我选择的是 wxall - all wxWidgets ports
tar jvxf wxWidgets-2.8.12.tar.bz2
cd wxWidgets-2.8.12
./configure --help #查看编译选项
./configure --prefix=/opt/wx --enable-unicode
make && make install
cd contrib/src/stc
make && make install
下载 wxPython
地址 http://www.wxpython.org/download.php#stable
file: http://downloads.sourceforge.net/wxpython/wxPython-src-2.9.1.1.tar.bz2
tar jvxf wxPython-src-2.9.1.1.tar.bz2
cd wxPython-src-2.9.1.1/wxPython
vi config.py
BUILD_GLCANVAS 到 BUILD_DLLWIDGET 这一块
修改 为
BUILD_GLCANVAS = 0 # If true, build the contrib/glcanvas extension module
BUILD_OGL = 0 # If true, build the contrib/ogl extension module
BUILD_STC = 1 # If true, build the contrib/stc extension module
BUILD_GIZMOS = 0 # Build a module for the gizmos contrib library
BUILD_DLLWIDGET = 0# Build a module that enables unknown wx widgets
保存退出
执行安装
python setup.py build_ext --inplace WX_CONFIG=/opt/wx/bin/wx-config
我的 wxPython-src-2.9.1.1.tar.bz2 解压后在 /var/www/soft/wxPython-src-2.8.12.0
完成后
export LD_LIBRARY_PATH=/opt/wx/lib:$LD_LIBRARY_PATH
export PYTHONPATH= /var/www/soft/wxPython-src-2.8.12.0/wxPython
/sbin/ldconfig
wxPython 例子
cd demo
python demo.py