在 macOS 上更新 Homebrew python3 的 tcl/tk 版本

编程入门 行业动态 更新时间:2024-10-27 17:23:09
本文介绍了在 macOS 上更新 Homebrew python3 的 tcl/tk 版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我的环境:

macOS 10.13来自 Homebrew 的 python 3.7.1

macOS 10.13 python 3.7.1 from Homebrew

我在 /System/Library/Frameworks/Tcl.framework/Versions/8.5/ 下的库存 Tcl/TK 8.5 上有很多 Tcl/TK 怪癖,并且想升级我的Tcl/TK.

I'm having lots of Tcl/TK quirks on the stock Tcl/TK 8.5 under /System/Library/Frameworks/Tcl.framework/Versions/8.5/, and would like to upgrade my Tcl/TK.

但是对于这个问题,我找不到任何升级的工作提示,包括:

But with this question I couldn't find any working tips for upgrading, including:

https://discussions.apple/thread/8066794

即使我安装了较新的版本,IDLE 也会针对旧的 TCL 版本发出警告

为什么我的 Python 是通过 home 安装的brew 不包括 Tkinter

如何更改 tk 版本您的 Python 安装?

如何将 Tcl/Tk 的 ActiveState 分发版链接到 HomeBrew 安装的 Python

我的测试结果

--with-tcl-tk 不再适用于最新的 Homebrew.运行 brew install python --with-tcl-tk 仍然指向系统 Tcl/TK 8.5.9.上述内容还通过卸载/安装周期进行了测试.Python 在安装最新的 ActiveTcl 后继续使用系统 Tcl/TK. --with-tcl-tk no longer works with the latest Homebrew. Running brew install python --with-tcl-tk still points to system Tcl/TK 8.5.9. The above is also tested with an uninstall/install cycle. Python keeps using system Tcl/TK after installing latest ActiveTcl.

推荐答案

在多次失败后,我得出的结论是,使这项工作顺利进行的最简单方法是完全忘记 Homebrew,卸载其 Python 包.

After many more failures, I concluded that the easiest way to make this work is to completely forget about Homebrew, uninstall its python packages.

然后安装最新的 ActiveTcl,然后安装 python 版本.python 版本将在最新的系统"Tcl/TK 之上工作,安装 ActiveTcl 后将刷新.不幸的是,Homebrew 忽略了它.

Then install the latest ActiveTcl and then the python version instead. The python version will work on top of the latest "System" Tcl/TK, which will be refreshed after installing the ActiveTcl. Unfortunately, Homebrew ignores it.

来自 python 的当前 3.7.2 是用 Tcl/TK 8.6.8 编译的:

The current 3.7.2 from python is compiled with Tcl/TK 8.6.8:

$ python3
Python 3.7.2 (v3.7.2:9a3ffc0492, Dec 24 2018, 02:44:43) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter as tk
>>> print(tk.Tcl().eval('info patchlevel'))
8.6.8

更新后,一些错误,例如在菜单上显示错误复选标记的复选按钮消失了.

After updating it, several bugs like checkbuttons showing wrong checkmarks on a menu disappeared.

这篇关于在 macOS 上更新 Homebrew python3 的 tcl/tk 版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 07:38:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1391317.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:版本   Homebrew   macOS   tk   tcl

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!