在linux安装 python 2.4.1配置Tkinter出错?

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

下载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  
   
  请问如何处理?非常感谢  
 

· 网友精彩回答:

发表者:liushulin

试试magiclinux,它的python是2.4版,并且内置tkinter

发表者:tabby

你要先安装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  
 

发表者:eishn

没有   x11,tkinter   不会被编译的。

.
处理 SSI 文件时出错
© 2006-2008 All Rights Reserved