Mac安装Python3,遇到IDLE中无法输入中文的问题,shell中显示如下警告
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "copyright", "credits" or "license()" for more information.
>>> WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
上网百度之,猜测是因为mac预装的tcl-tk8.5.9版本不稳定,于是使用homebrew升级至最新版本的8.6.6版本,发现还是不起作用,观察命令行中发现有如下提示:
This formula is keg-only, which means it was not symlinked into /usr/local,
because tk installs some X11 headers and macOS provides an (older) Tcl/Tk.
If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> ~/.bash_profile
For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/tcl-tk/lib
CPPFLAGS: -I/usr/local/opt/tcl-tk/include
于是按照提示修改配置文件发现还是不行查询当前tcl-tk版本显示如下
~ hetunyu$ tclsh
% info patchlevel
8.6.6
但是IDLE中的Tk version一直显示8.5.9