玩龙天子 发表于 2018-8-4 06:36:50

Python的Tkinter库的安装

  Tkinter是Python的GUI widget。一般情况下Linux都没有自带,要自己安装。
  1、确定Tkinter没有安装:
  >>> import Tkinter
  Traceback (most recent call last):
  File &quot;<stdin>&quot;, line 1, in ?
  File &quot;/usr/lib/python2.4/lib-tk/Tkinter.py&quot;, line 41, in ?
  raise ImportError, str(msg) + ', please install the python-tk package'
  ImportError: No module named _tkinter, please install the python-tk package
  >>>
  2、安装Tkinter:
  $sudo apt-get install python-tk
  3、安装成功:
  >>> import Tkinter
  >>>
页: [1]
查看完整版本: Python的Tkinter库的安装