導入錯誤:沒有名爲“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'
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章