Skip to main content
 首页 » 编程设计

python-3.x之适用于 Windows 的 Python 3.5 缺少 tkinter

2024年12月31日11kenshinobiy

我安装了适用于 Windows 的 Python 3.5.1(官方 python.org 安装程序),但它似乎缺少 tkinter。例如:

C:\Users\kostya>python 
Python 3.5.1 (v3.5.1:37a07cee5969, Dec  6 2015, 01:38:48) [MSC v.1900 32 bit (In 
tel)] on win32 
Type "help", "copyright", "credits" or "license" for more information. 
>>> from tkinter import * 
Traceback (most recent call last): 
  File "<stdin>", line 1, in <module> 
ImportError: No module named 'tkinter' 

有谁知道我可以下载这个包吗?

请您参考如下方法:

安装程序有一个选项“[X] install tkinter, IDLE, turtle”。默认情况下它应该是打开的,但您可能已将其关闭。如果您再次运行安装程序,您应该会看到一个修复选项。这应该让您有一个选项来查看是否选中了该框。必须确定它是和'修复'。