简体   繁体   中英

My Idle (idle3) from python installed with homebrew on a mac crashes

Idle3 (of python3) regularly crashes when in a window and using the middle mousewheel.

There is always the same error left in Terminal:

Traceback (most recent call last): File "/usr/local/bin/idle3", line 5, in main() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/idlelib/pyshell.py", line 1548, in main root.mainloop() File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/tkinter/ init .py", line 1280, in mainloop self.tk.mainloop(n)

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xFF in position 0: invalid continuation byte `

The problem seems to be that brew installed python without tcl-tk, thus using the old tcl-tk from mac-os. This one has a problem interpreting some mousewheel commands.

The solution : brew reinstall python --with-tcl-tk

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM