在Mac上以自制软件安装的python的My Idle(idle3)崩溃 [英] My Idle (idle3) from python installed with homebrew on a mac crashes

查看:206
本文介绍了在Mac上以自制软件安装的python的My Idle(idle3)崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(python3的)Idle3在窗口中并使用鼠标中键时经常崩溃.

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

在终端中始终存在相同的错误:

There is always the same error left in Terminal:

跟踪(最近一次呼叫最近):main()文件中第5行的文件"/usr/local/bin/idle3" "/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,在主循环中.tk.mainloop(n)

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'编解码器无法解码位置0的字节0xFF:无效的连续字节 `

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

推荐答案

问题似乎是brew在不带tcl-tk的情况下安装了python,因此使用了来自mac-os的旧tcl-tk.这一个在解释某些鼠标滚轮命令时遇到问题.

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.

解决方案: brew reinstall python --with-tcl-tk

这篇关于在Mac上以自制软件安装的python的My Idle(idle3)崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆