超級網迷

超級網迷+ 電腦迷+ 音樂迷
個人資料
正文

Deploy wxPython environment on REDHAT 6.x (64 bit)

(2014-07-04 10:47:42) 下一個

~~~~~~~~~~~Step 1: wxWidgets~~~~~~~~~~~~~~~~

1) Download source archive of wxWidget 3.0.1 (wxWidgets-3.0.1.tar.bz2, size 19.1MB) from sourceforge.net
https://sourceforge.net/projects/wxwindows/files/3.0.1/wxWidgets-3.0.1.tar.bz2
or from http://www.wxwidgets.org/downloads/

To expand tarball, use "tar -xvf "


2) Follow the guide to compile and install:
http://wiki.wxwidgets.org/Compiling_and_getting_started

You might need the following build tools (-dev package included):
- g++
- autotools
- gtk+

Package Manager GUI is highly recommended here to install these necessary build tools.

3) Compile and install.
- ./configure --enable-unicode CFLAGS="-fPIC" CXXFLAGS="-fPIC"
- make
- make install
- make clean

~~~~~~~~~~Step 2: Python2.7.2~~~~~~~~~~~~~~~~
Install a newer version of Python if you wish to use it
instead of the one coming with the OS.
In my case: I installed Python 2.7.2

~~~~~~~Step 3: wxPython 3.0~~~~~~~~~~~~~~~~~~
Steps to install wxPython 3.0 from source
1) Download source (wxPython-src-3.0.0.0.tar.bz2)
http://www.wxpython.org/download.php

2) Build and install wxPython 3.0 to a location (/opt in my case)
Refer to this page:
http://www.wxpython.org/BUILD.html

3) Something like the following:
cd wxPython-src-3.0.0.0/wxPython
python2.7 build-wxpython.py --build_dir=../bld
or
cd wxPython-src-3.0.0.0/wxPython
python2.7 build-wxpython.py --build_dir=../bld --install

4) Then set the following variable in ~/.bash_profile:
export PYTHONPATH=/opt/wxPython-src-3.0.0.0/wxPython
export LD_LIBRARY_PATH=/opt/wxPython-src-3.0.0.0/bld/lib:$LD_LIBRARY_PATH

5) Run the demo:
python demo/demo.py

~~~~~~~Step 4: Python IDE~~~~~~~~~~~~~
Choose and install your own python IDE:
I installed Komodo 7:

The follow is to be set in ~/.bashrc:
export PATH="/opt/Komodo-IDE-7/bin:$PATH"

======= END ========

[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.