# -DWITH_BLT -I/usr/local/blt/blt8.0-unoff/include -lBLT8.0 \
# *** Uncomment and edit for PIL (TkImaging) extension only:
# (See http://www.pythonware.com/products/pil/ for more info)
# -DWITH_PIL -I../Extensions/Imaging/libImaging tkImaging.c \
# *** Uncomment and edit for TOGL extension only:
# -DWITH_TOGL togl.c \
# *** Uncomment and edit to reflect your Tcl/Tk versions:
-ltk8.4 -ltcl8.4 \
# *** Uncomment and edit to reflect where your X11 libraries are:
-L/usr/X11R6/lib \
# *** Or uncomment this for Solaris:
# -L/usr/openwin/lib \
# *** Uncomment these for TOGL extension only:
# -lGL -lGLU -lXext -lXmu \
# *** Uncomment for AIX:
# -lld \
# *** Always uncomment this; X11 libraries to link with:
-lX11
[/myphp]
保存退出了。
退出到目录:python-2.3.2中。
./configure; make; make install
完成后运行python
出现:
Python 2.3 (#1, Sep 12 2003, 14:59:11)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
输入import Tkinter
如果没有错误出现那么
恭喜你,完成了python+tk的安装了。
2、mysql,postgresql模块的安装:
下载这两个模块后,拷入到/usr/local/src中
记得修改Setup.py其中的关于lib_dir,include_dir目录的定义,如果你的mysql, postgresql的开发目录不在相应的路径中,,则增加相应的路径,然后运行:python build; python install,来完成安装。
3、wxPython的安装:
1. We'll be making a private copy of wxGTK so it doesn't conflict with
one used by wxGTK C++ apps that expect to have the default binary
installed from RPM or whatever. I put it in /usr/lib/wxPython, but
you can use whatever you like. I'll just set a variable to our wx
prefix to reference later:
export WXPREF=/usr/lib/wxPython
2. Make a build directory and configure wxGTK.
cd wxPythonSrc-2.4.0 # or whatever the top-level dir is
mkdir build
cd build
../configure --with-gtk \
--prefix=$WXPREF \
--enable-rpath=$WXPREF/lib \
--with-opengl \
--enable-geometry \
--enable-optimise \
--enable-debug_flag \
You may want to use --enable-debug instead of --enable-optimise if