首页 > 解决方案 > 无法使用 PyCharm 调试 PyQt5 应用程序

问题描述

所以用 PyCharm 运行我的 PyQt5 应用程序是没有问题的。但是,尝试调试它时,我收到以下错误消息:

Connected to pydev debugger (build 191.7479.30)
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl, xcb.

Reinstalling the application may fix this problem.

我设法找到一些随机的中文帖子,说一些关于指定的内容QT_QPA_PLATFORM_PLUGIN_PATH,所以我将其设置为~/.local/lib/python3.6/site-packages/PyQt5/Qt/plugins(我使用的是 python 3.6)。我现在收到一条新的错误消息:

Connected to pydev debugger (build 191.7479.30)
Cannot mix incompatible Qt library (version 0x50a01) with this library (version 0x50c02)

Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

我尝试升级我的 PyQt5 包,但不断收到相同的错误(但现在第一个版本号大于第二个版本号)。我需要升级 PyQt5 库吗?我该怎么做?

标签: pythonpyqtpycharmpyqt5

解决方案


推荐阅读