ModulenotFoundError:No模块名为' tkinter'错误,尽管它一直有效

发布于 2025-01-28 10:03:22 字数 150 浏览 2 评论 0原文

我不能再使用tkinter模块。在我切换到Python 3之前,脚本没有任何问题就开始了。现在出现此错误:

ModuleNotFoundError: No module named 'Tkinter'

您能帮我解决问题吗?

I can no longer use the Tkinter module. Before I switched to Python 3, the script started without any problems. Now this error appears:

ModuleNotFoundError: No module named 'Tkinter'

Can you help me solve the problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

时光瘦了 2025-02-04 10:03:22

请小心,您必须将TKINTER用于Python 3和Python 2的TKINTER。

因此,如果您使用的是Python 3,则该模块已重命名为tkinter。

Be careful, you must use tkinter for Python 3 and Tkinter for Python 2.

So, if you're using Python 3, the module has been renamed to tkinter.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文