Arch Linux上的Python3.8 Tkinter分段错误

问题描述

我正在尝试在Arch上使用XMing / XQuartz运行一个简单的Tkinter GUI。我能够在Windows,Max和Ubuntu上运行相同的代码。当我尝试在Arch(内核:5.9.4-arch1-1)上运行它时,几秒钟不做任何操作,我得到了错误Segmentation fault (core dumped)。在 dmesg 中,我找到了traps: python3[917] general protection fault ip:7f61c3c9aa07 sp:7ffc11f70a20 error:0 in libtk8.6.so[7f61c3bd2000+df000]。所需的行为是显示一个GUI窗口,并且程序不会因错误而崩溃。

# code that produces error

from tkinter import *;

class Window(Tk):
    def __init__(self):
        Tk.__init__(self);

def main():
    window = Window();
    window.mainloop();

if __name__ == '__main__':
    main();

我已经跑过pacman -Syu。此外,我已经从这台计算机远程使用X11运行了一个I / O GUI C程序。任何解决方案或见解都将不胜感激。

我的包裹是:

  • python3.8.6
  • tk 8.6.10-2
  • xorg-xauth 1.1-2
  • xorg-xhost 1.0.8-2

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...