在linux安装 python 2.4.1配置Tkinter出错?
八月 3, 2007
发表在: java
下载python2.4.1源码编译安装后import tkinter 出错
使用下面命令编译安装,
./configure
make
make install
"/usr/local/lib/python2.4/site-packages/eric3/debugger/debugclient.py", line 55, in ?
debugclient.main()
file "/usr/local/lib/python2.4/site-packages/eric3/debugger/debugclientbase.py", line 1671, in main
self.interact()
file "/usr/local/lib/python2.4/site-packages/eric3/debugger/debugclientbase.py", line 835, in interact
self.eventloop()
file "/usr/local/lib/python2.4/site-packages/eric3/debugger/debugclientbase.py", line 855, in eventloop
self.readready(self.readstream.fileno())
file "/usr/local/lib/python2.4/site-packages/eric3/debugger/asynciobase.py", line 68, in readready
self.handleline(s)
file "/usr/local/lib/python2.4/site-packages/eric3/debugger/debugclientbase.py", line 422, in handleline
execfile(sys.argv[0], self.debugmod.__dict__)
file "/mnt/user/axisinletshocksolver/coneapp.py", line 3, in ?
from appshell.appshell import *
file "/mnt/user/axisinletshocksolver/appshell/appshell.py", line 11, in ?
from tkinter import *
file "/usr/local/lib/python2.4/lib-tk/tkinter.py", line 38, in ?
import _tkinter # if this fails your python may not be configured for tk
importerror: no module named _tkinter
请问如何处理?非常感谢
电脑软件技术推荐:
试试magiclinux,它的python是2.4版,并且内置tkinter
你要先安装tcl/tk 在http://sourceforge.net/project/showfiles.php?group_id=10894
然后你安装python的时候,要带以下参数:
--with-tk: 带有tcl/tk库编译。
--with-tcl-library=dir: tcl 库文件位于 dir
--with-tcl-include=dir: tcl 包含文件位于 dir
--with-tk-library=dir: tk 库文件位于 dir
--with-tk-include=dir: tk 包含文件位于dir
没有 x11,tkinter 不会被编译的。
.
No comments in this entry