导入错误:没有名为“Tkinter”的模块 - ImportError: No module named 'Tkinter'

问题:

For some reason, I can't use the Tkinter or tkinter module.出于某种原因,我不能使用Tkintertkinter模块。 After running the following command in the python shell在python shell中运行以下命令后

import Tkinter

or要么

import tkinter

I got this error我收到这个错误

ModuleNotFoundError: No module named 'Tkinter' ModuleNotFoundError: 没有名为“Tkinter”的模块

or要么

ModuleNotFoundError: No module named 'tkinter' ModuleNotFoundError: 没有名为“tkinter”的模块

What could be the reason for and how can we solve it?可能是什么原因以及我们如何解决它?


解决方案:

参考一: https://stackoom.com/question/1khDI
参考二: ImportError: No module named 'Tkinter'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章