为什么Tkinter在Mac上失败 [英] Why tkinter fails on Mac
本文介绍了为什么Tkinter在Mac上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Mac上使用tkinter.但是,当我使用以下简单代码时,计算机将重新启动.
I was using tkinter on Mac. But when I used the following simple code, the computer will restart.
import tkinter as tk
window = tk.Tk()
出什么问题了?谢谢!
- Mac:Mojave,版本10.14.6
- tkinter:8.6版
- python:3.7.3
推荐答案
Seems to be like common problem python.org/download/mac/tcltk/#built-in-8-6-8 according to them
如果您使用的是macOS 10.6或更高版本,则Apple提供的Tcl/Tk 8.5有严重的错误,可能会导致应用程序崩溃.
If you are using macOS 10.6 or later, the Apple-supplied Tcl/Tk 8.5 has serious bugs that can cause application crashes.
建议您不要重新安装满足要求&的python版本,而不是修复TCL/TK.使用它 python.org/downloads/release/python-374
Rather than fixing TCL/TK I recommend you to want to reinstall a python version that satisfies the requirement & use it python.org/downloads/release/python-374
这篇关于为什么Tkinter在Mac上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文