Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to update tcl-tk?

My computer is crashing during debug. It seems to be because of tcl-tk 8.5.9.


I installed tk 8.5.18 and brew install 8.6.7


Python initially used the 8.5.18. I susptect mac restarted and now it went back to the original.


How to either replace the Framework version or to fix the link to python such that it always use a version I choose.

MacBook Air (13-inch, Early 2014), iOS 10.2.1, The OS is 10.12.3

Posted on Sep 14, 2017 2:04 PM

Reply
4 replies

Jan 4, 2018 10:18 AM in response to LordSetok

You can send feedback to the macOS product team, but that is not pressuring Apple by any means. The only pressure that Apple responds too is in threats from: legal, bad press, or stock market performance.


Tcl/Tk is open source with a BSD-style license, so licensing alone would likely not be an issue. But, Apple has not touched these particular frameworks in years, and that sends a message that they do not want to expend engineering resources on Tcl/Tk modernization, any more than modernizing the curses library.


There is such a Swift fixation, that even High Sierra is shipping with the same v2.7.10 Python that shipped with El Capitan three years ago, and Python is presently at v2.7.14. And Apple has not addressed Python 3 yet either...


I mentioned above how I continue to build source from Python dot org to incorporate ActiveState 8.6.n Frameworks.

Sep 14, 2017 3:24 PM in response to osbornnyc

Apple's Python 2.7.10 was compiled to look for Tcl/Tk 8.5.9. There is nothing you can do to make it use the ActiveState 8.5.18 or later libraries.


If you installed Python 2.7.13, or 3.6.2 via the home brew package manager, and you specified --with-tcl-tk on the brew install line, then you will be using homebrew's version of Tcl/Tk (whatever that is). If you omitted that build directive, then home brew will compile the Python version to use Apple's default Tcl/Tk 8.5.9.


If you download Python dot org's Python binary, either before, or after you install ActiveState 8.5.18 Tcl/Tk libraries, it will use these libraries because that is what Python dot org compiles its binary distribution to use if present.


I am still using the old, unsupported Pythonbrew package manager (with my own patches), and it just uses the ActiveState 8.6.4 Tcl/Tk libraries that I have installed when compiling for Python 2 or 3 builds.


Here is a short Python script that informs what version of the Tcl/Tk libraries the current Python version is using.


#!/usr/bin/env python

# coding: utf-8


import sys


try:

import Tkinter as tk # Python 2

except ImportError:

import tkinter as tk # Python 3


print("Tcl Version: {}".format(tk.Tcl().eval('info patchlevel')))

print("Tk Version: {}".format(tk.Tk().eval('info patchlevel')))

sys.exit()

Jan 4, 2018 10:30 AM in response to LordSetok

LordSetok wrote:


As an addition to this, I would advise people to pressure Apple into updating Tcl. The version on macOS is absolutely ancient, and is missing many crucial fixes and updates (including the OO stuff in 8.6).

The open source tools that Apple includes with the operating system are generally for Apple's use only. That is why they are stuck in time like that. Any macOS components that depend on tcl/tk for some reason are at end-of-life, along with the rest of macOS.


Any 3rd party developer that depends on one of these tools needs to install a custom version for their own use, even if that version is the same as what Apple provides. Then, if you need to add modules or apply patches, you can do so easily instead of being blocked by SIP or having to hack around with various dynamic extension methods.

How to update tcl-tk?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.