qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
可以在 .zshrc 中添加:
1
export QT_DEBUG_PLUGINS=1
再运行,查看具体原因
1 2 3 4 5
qt.core.library: "/home/zhangzhiyu/miniconda3/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so" cannot load: Cannot load library /home/zhangzhiyu/miniconda3/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory) qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "/home/zhangzhiyu/miniconda3/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so" : "Cannot load library /home/zhangzhiyu/miniconda3/lib/python3.11/site-packages/PyQt6/Qt6/plugins/platforms/libqxcb.so: (libxcb-cursor.so.0: cannot open shared object file: No such file or directory)" qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.