Tkinter配置 [英] Tkinter configuration

查看:157
本文介绍了Tkinter配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程的超级新手,并且正在使用pycharm作为我的IDE.

I'm super new to programming and I'm using pycharm as my IDE.

import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'

不确定为什么会收到此错误,我也安装了Tk库,但仍然收到错误.我正在使用Mac.

Not sure why I get this error, I installed the Tk library as well and still get the error. I am using a Mac.

推荐答案

好吧,如果您使用的是python 3.8,则在安装安装程序中,它具有以下选择:

Well,if you are using python 3.8,In the install Setup,it has this choice:

如果这不能解决您的问题,请阅读python官方文档: IDLE和tkinter在MacOS上使用Tcl/Tk .

If this couldn't solve your problem,Read the python official document:IDLE and tkinter with Tcl/Tk on macOS.

这篇关于Tkinter配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆