qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in

这篇具有很好参考价值的文章主要介绍了qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

兄弟们看看是不是这个错:

QObject::moveToThread: Current thread (0xe5205f0) is not the object's thread (0xa14d0f0).
Cannot move to target thread (0xe5205f0)

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/xxx/python3.8/site-packages/cv2/qt/plugins" 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: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

VScode 80年不出个错,今儿冒出来这个,我也不知道是mmdet配置问题,还是opencv-python的问题,还是VScode的问题hhhh

参考该链接:
https://blog.csdn.net/LOVEmy134611/article/details/107212845

把QT的flag打开,我们才能看到报错的详细信息

export QT_DEBUG_PLUGINS=1

注意,这个执行后,该环境变量只在当前终端有效,关了这个终端就失效了,当然你也可以写到.bashrc

然后就整出一个超级长的报错:

QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins" ...
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/PyQt5/Qt5/plugins" ...
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/bin" ...
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/2to3"
QElfParser: 'xxxxminiconda3/envs/tor38/bin/2to3-3.8' is not an ELF object
"'xxxxminiconda3/envs/tor38/bin/2to3-3.8' is not an ELF object" 
 not a plugin
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/2to3-3.8"

......

QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/yapf"
QElfParser: 'xxxxminiconda3/envs/tor38/bin/yapf' is not an ELF object
"'xxxxminiconda3/envs/tor38/bin/yapf' is not an ELF object" 
 not a plugin
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/bin/yapf-diff"
QElfParser: 'xxxxminiconda3/envs/tor38/bin/yapf-diff' is not an ELF object
"'xxxxminiconda3/envs/tor38/bin/yapf-diff' is not an ELF object" 
 not a plugin
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
Found metadata in lib xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
    "xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 331520
}


Got keys from plugin meta data ("webgl")
QFactoryLoader::QFactoryLoader() looking at "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so"
Found metadata in lib xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/PyQt5/Qt5/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
    "xcb"
]
},
"archreq": 0,
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 331520
}


Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "xxxxminiconda3/envs/tor38/bin/platforms" ...
loaded library "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins/platforms/libqxcb.so"
QObject::moveToThread: Current thread (0x5eeb0e0) is not the object's thread (0xb291550).
Cannot move to target thread (0x5eeb0e0)

......


qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "xxxxminiconda3/envs/tor38/lib/python3.8/site-packages/cv2/qt/plugins" 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: xcb, eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, webgl.

参考该链接:
https://github.com/google/mediapipe/issues/1373
与这哥们报的错误差不多

这位大哥这样做的
qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in
当然你也可以在环境变量中添加:

export DISPLAY=:0	

launch.json 中这样添加
qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in

解决是解决了,但是给我整出来一个

Invalid MIT-MAGIC-COOKIE-1 Key(环境变量名字)

qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in
暂时不影响文章来源地址https://www.toymoban.com/news/detail-494559.html

到了这里,关于qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包