PyQt5运行时xcb平台插件加载失败的错误求助
PyQt5运行时xcb平台插件加载失败的错误求助
我在网上搜了一堆这个问题的解决办法,但没一个能解决我的问题,已经折腾好长时间了还是搞不定😭。
我遇到的错误信息是这样的:
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.Available platform plugins are: linuxfb, minimal, offscreen, vnc, webgl, xcb.
我的代码其实就是个用来测试的简单窗口,代码如下:
import sys from PyQt5.QtWidgets import QApplication, QWidget app = QApplication(sys.argv) window = QWidget() window.setWindowTitle("My First PyQt5 Window") window.setGeometry(100, 100, 400, 300) window.show() sys.exit(app.exec_())
我用的是VSCode,环境就是它默认推荐的标准环境。
有没有大佬能帮忙看看呀,万分感谢!
备注:内容来源于stack exchange,提问作者Will Potts
相关产品推荐
相关产品推荐

