📌  相关文章
📜  ImportError: No module named _tkinter, please install the python-tk package - Python Code Example

📅  最后修改于: 2022-03-11 14:46:43.891000             🧑  作者: Mango

代码示例3
try:
    # for Python2
    # sudo apt-get install python-tk 
    from Tkinter import *   ## notice capitalized T in Tkinter 
except ImportError:
    # for Python3
    # sudo apt-get install python3-tk 
    from tkinter import *   ## notice lowercase 't' in tkinter here