tkinter show error: macOS 11 or later required

作業系統是 macOS "Big Sur", This is the code:
from tkinter import * 
window = Tk() 
window.mainloop()

error message:

macOS 11 or later required

runtime screen:


網傳解法:

This is an issue in the way brew installs Python (source). If you install Python directly via the official installer here then tkinter should work as expected.

重新下載官方的Python,下載用網址:
https://www.python.org/downloads/

會下載檔案:python-3.x.x-macosx1x.x.pkg, 點2下即可開始安裝 python為新的版本。


相關網頁

Interpreter crashes trying to use tkinter library
https://stackoverflow.com/questions/65315077/interpreter-crashes-trying-to-use-tkinter-library

Python Tkinter crashes on macOS 11.1 beta
https://bugs.python.org/issue42480

相關文章

寫留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *