输入中文
https://www.python.org/download/mac/tcltk/
这里说
If you are using a Python from any current python.org Python installer for macOS (3.7.2+, 3.6.8, or 2.7.16+), no further action is needed to use IDLE or tkinter. A built-in version of Tcl/Tk 8.6 will be used.
重新安装python 3.6.8 或 python 3.7.0 或 2.7.16+ 就可以避免IDLE或Tkinter无法输入中文的问题
启动指定版本的IDLE
我用的pyenv进行的版本python版本管理
pyenv local 3.6.8
IDLE3
按钮不显示文字
from tkinter import ttk
b=ttk.Button(...)
解决问题
网友评论