阅读281 返回首页    go iPhone_iPad_Mac_apple


How to update tcl

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.



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()



最后更新:2017-09-15 08:38:37

  上一篇:go Adding dictionaries
  下一篇:go Mac formatted external disk is now read only; c...