========================== INSTALLING wxPython from sources for LINUX ========================== Tested on ARCH linux and Debian linux (ARCH OF COURSE IS BETTER!!!! see www.archlinux.org) This howto is mainly from http://www.wxpython.org/BUILD.html with some minor amplification from me. Note: This will not destroy your existing older wxPython installation, you can later use either one. This example uses python2.3. It assumes you have reasonable knowledge of your computer, and how to change to root user, how to compile and install programs, that you have installed python. I've written this from memory so it could contain mistakes. Using these instructions you will: -download the wxPython sources -compile wxWidgits -compile wxPython -learn how to have your new wxPython live with your old wxPython Before Starting read this page: http://www.wxpython.org/BUILD.html (you only need this page NOT THE INSTALL PAGE) if Using debian ensure the python-dev files are installed or it won't work! Step1: Download wxPython sources, documentation and demo files: - go to http://www.wxpython.org/download.php#binaries and scroll down the page to download: wxPythonDocs wxPythonDemo wxPythonSrc Step2 Untar the source code: address@hidden tar --directory /usr/src -xzvf wxPythonSrc-2.5.2.8.tar.gz address@hidden cd /usr/src/wxPythonSrc-2.5.2.8/ address@hidden export WXDIR=/usr/src/wxPythonSrc-2.5.2.8/ Step3: Create a build directory, make sure you are in $WXDIR, and change to bld directory address@hidden:/usr/src/wxPythonSrc-2.5.2.8/# mkdir bld address@hidden:/usr/src/wxPythonSrc-2.5.2.8/# cd bld address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# Step4: Create a configure file and a make file to compile the source from: The configure file - cut and past this text and save as configure to the $WXDIR/bld/ directory =====start of configure file==================== ../configure --prefix=/opt/wx/2.5 \ --with-gtk \ --with-opengl \ --enable-debug \ --enable-geometry \ --enable-sound --with-sdl \ --enable-display \ --enable-unicode \ --with-libjpeg=builtin \ --with-libpng=builtin \ --with-libtiff=builtin \ --with-zlib=builtin ===== end of configure file====================== The make file by cutting and pasting this text to the file make save to the $WXDIR/bld/ directory ====start of make file========================= make $* \ && make -C contrib/src/gizmos $* \ && make -C contrib/src/ogl CXXFLAGS="-DwxUSE_DEPRECATED=0" $* \ && make -C contrib/src/stc $* \ && make -C contrib/src/xrc $* ======end of make file========================= Step5; Run configure address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# ./configure Step6 Run make and install (and wait a fair while) address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# make (and go and have coffee) address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# make install Step7 Check that wxWidgets built correctly address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# cd /opt/wx/2.5 (these should now exist) Step8 Build the wxPython stuff First add stuff to some PATH's address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# export PATH=$PATH:/opt/wx/2.5/bin address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# export LD_LIBRARY_PATH=/opt/wx/2.5/lib address@hidden:/usr/src/wxPythonSrc-2.5.2.8/bld# cd $WXDIR/wxPython You should now be in for example: address@hidden:/usr/src/wxPythonSrc-2.5.2.8/wxPython# NB: ******************************************************************************************************** With this last step, if you don't include the WX_CONFIG and an earlier version of wxPython exists on your machine the wrong wx-config file will be found and the build will fail. All this text is on the one line in the terminal ********************************************************************************************************* root@ etc etc# python2.3 setup.py build_ext --inplace --debug WX_CONFIG=/opt/wx/2.5/bin/wx-config UNICODE=1 This build will take a while Step9: Using your new wxPython You can use either your old version of new version by changin the path variables. To test (or later use) the latest version, as user type the following in a terminal: address@hidden:~$ export PATH=$PATH:/opt/wx/2.5/bin address@hidden:~$ export LD_LIBRARY_PATH=/opt/wx/2.5/lib address@hidden:~$ export WXDIR=/usr/src/wxPythonSrc-2.5.2.8/ address@hidden:~$ export PYTHONPATH=$WXDIR/wxPython address@hidden:~$ cd $WXDIR/wxPython/demo address@hidden:~$ python2.3 demo.py Step10 Enjoy! ADDENDUM: I have typed this in from memory - please try and inform me of errors Richard Terry Gnumed Project www.gnumed.org address@hidden ACKNOWLEDGMENTS: To whoever wrote http://www.wxpython.org/BUILD.html To the wxPython users list for encouragement To Robin Dunn for (wxPython) and pointers re python-dev dependencies