如何解决Mac版关于python3.5.X的Tcl/Tk 的警告

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何解决Mac版关于python3.5.X的Tcl/Tk 的警告相关的知识,希望对你有一定的参考价值。

ActiveTcl Downloads

从这里下载Tcl试试

下载8.6.4版本还会报错,我又试着装了下8.5.18,重启IDLE便没有提示不稳定了。

而且,也可以打印中文了:

<img src="https://pic2.zhimg.com/50/c54861bc211c56caa88f30594f155751_hd.png" data-rawwidth="697" data-rawheight="755" class="origin_image zh-lightbox-thumb" width="697" data-original="https://pic2.zhimg.com/c54861bc211c56caa88f30594f155751_r.png">

原因如下(google而来):

Stan W writes (NB. edited for brevity):

Over the last couple of days I have started using your great book with my two sons (13 and 15 years old).I'm reaching out to you with the following question because I have noticed other people asking about the same issue online, withat least one mentioning your book, so I think you posting the question and answer to your blog might help other people in additionto me and my sons.

We are using Mac OSX and have installed Python 3.3.3 from python.org, and are getting this message when opening IDLE:

"WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable. Visit IDLE and tkinter with Tcl/Tk on Mac OS X forcurrent information."

I have installed "Mac OS X 64-bit/32-bit Installer (3.3.3) for Mac OS X 10.6 and later" (file: python-3.3.3-macosx10.6.dmg) andinstalled the "ActiveTcl 8.6.1 for Mac OS X (10.5+, x8664/x86)" (file: ActiveTcl8.6.1.1.297588-macosx10.5-i386-x8664-threaded),but IDLE keeps showing the same error message.

Thank you very much for any help you can provide!

I'm not convinced ActiveTcl 8.6.1 is the right version to install - I suspect rather than installing the latest and greatest, you should be using version 8.5.15.0. Python (and thus IDLE) will probably be using the latest 8.5 version of Tcl/Tk (i.e. 8.5.x) — you're installing a completely different version (8.6), which it's not looking for at all. Hence even though you think you've re-installed, you'll still be getting the same error message.

Hope that helps.

参考技术A tcl/tk是一个用tcl语言写的,名为TK的图形界面库。这个警告是说,本版本的tcl/tk(8.5.9)可能不够稳定。这是因为,apple将python重新编译过,这是一个改过版的python,所以有些警告信息也是有可能的。

不用在意它。对于tk的稳定性不用担心。你很少有机会用tk写图形界面的。即使写也,也不用担心它不稳定。本来就是简易程序。用几次就扔。如果真想做一个正式的界面,建议用gtk, qt等库。

以上是关于如何解决Mac版关于python3.5.X的Tcl/Tk 的警告的主要内容,如果未能解决你的问题,请参考以下文章

关于idlf无法输入中文的解决办法

关于在k8s-desktop-for-mac如何坚持优雅地填坑

《网易MuMu》MAC版使用常见问题解决办法

关于mac上如何U盘

一条命令解决mac版本python IDLE无法输入中文问题

针对自定义构建的 tcl85.lib 的链接器错误,针对 ActiveState 发行版的 tcl85.lib