[英]My Idle (idle3) from python installed with homebrew on a mac crashes
在窗口中並使用鼠標中鍵時,(python3的)Idle3通常會崩潰。
終端中始終存在相同的錯誤:
追溯(最近一次通話):文件“ / usr / local / bin / idle3”,位於main()中的第5行,文件“ /usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/ 3.7 / lib / python3.7 / idlelib / pyshell.py”,行1548,在主root.mainloop()文件中,“ / usr / local / Cellar / python / 3.7.0 / Frameworks / Python.framework / Versions / 3.7 / lib / python3.7 / tkinter / init .py“,行1280,在mainloop self.tk.mainloop(n)中
UnicodeDecodeError:'utf-8'編解碼器無法解碼位置0的字節0xFF:無效的繼續字節`
問題似乎是brew在沒有tcl-tk的情況下安裝了python,因此使用了來自mac-os的舊tcl-tk。 這是一個解釋某些鼠標滾輪命令的問題。
解決方案: brew reinstall python --with-tcl-tk
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.