如何将Tcl/Tk的ActiveState发行版链接到安装的HomeBrew Python [英] How do I link the ActiveState distribution of Tcl/Tk to HomeBrew installed Python

查看:216
本文介绍了如何将Tcl/Tk的ActiveState发行版链接到安装的HomeBrew Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用macOS 10.12.1 Sierra.我正在使用安装了Python 2.7.12的

I am using macOS 10.12.1 Sierra. I am using Python 2.7.12 installed with

brew install python

但是IDLE发出警告

WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.

可以肯定的是,它经常崩溃. macOS的预装版本是8.5.9.

and sure enough, it crashed frequently. 8.5.9 is the macOS preinstalled version.

我可以从 ActiveState 网站下载稳定版8.5.18(由 python ,可与python.org中的python安装配合使用(因为它们会寻找其他任何版本诉诸于不稳定的macOS默认8.5.9之前的Tcl/Tk).

I can download the stable 8.5.18 from the ActiveState website (as recommend by python, which works with the python installations from python.org (as they look for any other version of Tcl/Tk before resorting to the unstable macOS default 8.5.9).

但是此下载不会影响brew安装的python IDLE,该IDLE继续使用8.5.9.

However this download does not affect the brew installed python IDLE, which continues to use 8.5.9.

有什么办法可以将更新的Tcl/Tk与Homebrew链接起来,还是可以将Tcl/Tk直接与Homebrew链接安装?

Is there anything I can do to link the updated Tcl/Tk with Homebrew, or can I install Tcl/Tk direct with homebrew?

我还注意到,使用anaconda python时会发生完全相同的问题,该蟒蛇使用的是预安装的mac tcl/tk 8.5.9,而不是用户安装的tcl/tk 8.5.18

I have also noticed that exactly the same problem happens when using anaconda python, which uses the preinstalled mac tcl/tk 8.5.9, not the user-installed tcl/tk 8.5.18

推荐答案

tcl-tk可以通过Homebrew安装,并且可以将安装了Homebrew的python链接到tcl-tk的该版本(已安装Homebrew). 唯一的"屏障"是启用正确的自制程序 tap ,因为在Homebrew的默认"分接头中找不到tcl-tk.
的确,tcl-tk在名为homebrew-dupes的水龙头中找到,其中包含(引用页面)

tcl-tk can be installed via Homebrew and one can have the Homebrew installed python linked to that version (Homebrew installed) of tcl-tk.
The only "barrier" to that, is to enable the right homebrew tap, as tcl-tk is not found in the "default" taps in Homebrew.
Indeed tcl-tk is found in the tap called homebrew-dupes which contain (cite the page)

可以复制由macOS提供的软件的

公式,尽管可能提供更新的版本或错误修正版本.

formulae that duplicate software provided by macOS, though may provide more recent or bugfix versions.

这里有指向自制唱片的链接:
https://github.com/Homebrew/homebrew-dupes
这是tcl-tk
的公式 https://github.com/Homebrew/homebrew-dupes/blob/master/tcl-tk.rb

Here the link to homebrew-dupes:
https://github.com/Homebrew/homebrew-dupes
and here the formula for tcl-tk
https://github.com/Homebrew/homebrew-dupes/blob/master/tcl-tk.rb

因此解决该问题的完整方法是:

So the complete recipe to solve the problem would be:

  1. 激活/安装自制双工水龙头
  2. 安装tcl-tk
  3. 使用homebrew tcl-tk安装homebrew python

要执行的命令如下:

  1. brew tap homebrew/dupes
  2. brew install tcl-tk
  3. brew install python --with-tcl-tk
  1. brew tap homebrew/dupes
  2. brew install tcl-tk
  3. brew install python --with-tcl-tk

这篇关于如何将Tcl/Tk的ActiveState发行版链接到安装的HomeBrew Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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