linux下编译安装Python with Tkinter
2009-05-10 22:15
741 查看
在windows下Tkinter为python的默认安装.而在linux下安装Tkinter必需手动修改/modules/setup配置文件,去掉相应选项前的注释符#. 否则会不能import _tkinter
setup修改例:
# The _tkinter module.
#
# The command for _tkinter is long and site specific. Please
# uncomment and/or edit those parts as indicated. If you don't have a
# specific extension (e.g. Tix or BLT), leave the corresponding line
# commented out. (Leave the trailing backslashes in! If you
# experience strange errors, you may want to join all uncommented
# lines and remove the backslashes -- the backslash interpretation is
# done by the shell's "read" command and it may not be implemented on
# every system.
# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT /
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib /
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include /
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include /
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include /
# *** Uncomment and edit for Tix extension only:
# -DWITH_TIX -ltix8.1.8.2 /
# *** Uncomment and edit for BLT extension only:
# -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
再运行
./configure
setup
setup install
setup修改例:
# The _tkinter module.
#
# The command for _tkinter is long and site specific. Please
# uncomment and/or edit those parts as indicated. If you don't have a
# specific extension (e.g. Tix or BLT), leave the corresponding line
# commented out. (Leave the trailing backslashes in! If you
# experience strange errors, you may want to join all uncommented
# lines and remove the backslashes -- the backslash interpretation is
# done by the shell's "read" command and it may not be implemented on
# every system.
# *** Always uncomment this (leave the leading underscore in!):
_tkinter _tkinter.c tkappinit.c -DWITH_APPINIT /
# *** Uncomment and edit to reflect where your Tcl/Tk libraries are:
-L/usr/local/lib /
# *** Uncomment and edit to reflect where your Tcl/Tk headers are:
-I/usr/local/include /
# *** Uncomment and edit to reflect where your X11 header files are:
-I/usr/X11R6/include /
# *** Or uncomment this for Solaris:
# -I/usr/openwin/include /
# *** Uncomment and edit for Tix extension only:
# -DWITH_TIX -ltix8.1.8.2 /
# *** Uncomment and edit for BLT extension only:
# -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
再运行
./configure
setup
setup install
相关文章推荐
- Linux 下编译安装 Python 3.4
- 【linux】编译安装python3.5交互模式下方向键乱码
- python3.0 在linux centerOS 5.2上的编译安装
- linux下编译安装新版本python和tornado
- Opencv3.3(Linux)编译安装至python的坑
- linux上编译安装python2.7.5
- Python_Linux下编译安装Python
- linux下编译安装python3.6.2即是升级本机的python2版本到3
- Linux下编译安装python3
- 通过编译源码在Linux上安装Python
- Linux 编译安装Nginx 配置 Python FastCGI Django (2) 安装python Django
- Linux下编译安装python3
- linux在python上的编译安装
- Python 2.7.6 在 linux 上的编译安装
- linux 编译安装python3.6的教程详解
- 以编译方式安装python 2.7(linux)
- linux上编译安装python2.7.5
- linux 编译安装 Python3.6 (保留自带Python2)
- Linux 下编译安装 Python3
- 在Linux系统上编译安装Python2.7.5