问题一

运行程序,报错qt.qpa.plugin: Could not load the Qt platform plugin “xcb” 定位后是pyqt5问题,什么修改动态连接文件、降低版本,各种方式都试过了都不能解决,使用conda安装后启动正常。

QObject::moveToThread: Current thread (0x557d2ffe4400) is not the object's thread (0x557d30751de0).
Cannot move to target thread (0x557d2ffe4400)qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/home/cv/anaconda3/envs/darknet/lib/python3.6/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.已放弃 (核心已转储)

pip卸载原有的pyqt5,使用conda install 安装

pip uninstall pyqt5
conda install pyqt

问题二

安装Qtpy后运行程序报错,经过反复查找资料调试后还是不能运行,最后发现是版本不匹配问题。

(darknet) cv@cv-System-Product-Name:~/wankou_detect_5_6_batch4$ python script.py
Traceback (most recent call last):File "script.py", line 1, in <module>from PyQt5 import QtWidgets
ImportError: /home/cv/anaconda3/lib/libQt5Core.so.5: version `Qt_5.12' not found (required by /home/cv/anaconda3/envs/darknet/lib/python3.8/site-packages/PyQt5/QtWidgets.so)

卸载掉之前的版本,或者直接安装就可以,安装适配的版本后成功运行,折腾了一上午,什么更改环境变量,什么方法都使了都不好用,最后重新装了pyqt5==5.12好用了。

pip install pyqt5==5.12

解决qt.qpa.plugin: Could not load the Qt platform plugin “xcb“问题相关推荐

  1. Ubuntu18.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“问题

    Ubuntu18.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin "xcb"问题 问题描述 定位问题 解决 ...

  2. 出现 qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in 的解决方法

    目录 1. 问题所示 2. 解决方法 3. 补充 1. 问题所示 出现如下问题: (py17)kkjz@kkjz-ThinkStation-P330:yolov5$python main.py QOb ...

  3. 解决qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found.

    项目场景: 在使用pyqt5出现问题,让人真的很头疼哇 问题描述 具体问题如下: qt.qpa.plugin: Could not load the Qt platform plugin " ...

  4. Ubuntu20.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“ 问题

    问题描述 python调用matplotlib.pyplot库进行图形绘制时弹出错误提示: qt.qpa.plugin: Could not load the Qt platform plugin & ...

  5. 【已解决】报错qt.qpa.plugin: Could not load the Qt platform plugin “windows“ in “...“ even though it was

    问题描述: 在Python程序中使用到Pyside2进行图形界面搭建,并使用Pyinstaller将程序打包为独立可执行文件后,双击.exe文件,出现报错: "qt.qpa.plugin: ...

  6. Ubuntu16.04下Python程序出现错误qt.qpa.plugin: Could not load the Qt platform plugin xcb解决方法

    问题描述 我在运行一个使用Pyqt5库的Python程序时,出现报错: qt.qpa.plugin: Could not load the Qt platform plugin "xcb&q ...

  7. 【Qt】Ubuntu18.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“问题

    1.问题描述 在ubuntu18.04中第一次安装QT5,运行时报错 qtcreator.sh qt.qpa.plugin: Could not load the Qt platform plugin ...

  8. 解决Ubuntu系统安装QT出错的问题:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it

    最近新入手的笔记本无法安装Ubuntu系统,无奈只能通过VirtualBox安装Ubuntu16.04,但是发现安装最新版本的QT5.12.10时候无法启动QtCreator程序,通过命令行运行发现如 ...

  9. qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even though it was found. This appl

    在ubuntu上使用qt出现报错:qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" ...

  10. uBuntu20.04安装Qt5.15.2出现qt.qpa.plugin: Could not load the Qt platform plugin “xcb“的问题解决

    由于Qt6.22太新,我不得不重新安装了Qt,同时安装了Qt6.22和Qt5.15.2,安装完毕后使用Qt6.22是没有问题的,但使用Qt5.15.2运行程序时,提示如下错误 qt.qpa.plugi ...

最新文章

  1. 元宇宙:基础-虚拟现实栈开发和虚拟土地
  2. Maya初学者完整的3D动画大师班视频教程
  3. openssl passwd之openssl命令详解
  4. 15 张图,了解一下 TCP/IP 必知也必会的 10个要点
  5. HttpRequestUtil用于URL请求(网络爬虫)
  6. leetcode53. 最大子序和详解——pygo
  7. 国潮中国风工作学习总结学习PPT模板
  8. python路径设置方法,R不转义,以及r转义出错SyntaxError
  9. Android程序财务管理,基于android的个人财务管理系统的设计与实现..pdf
  10. 一文看懂机器视觉工业相机与普通相机的区别
  11. php memcache技术,Memcache操作类如何在PHP中使用
  12. Aop_AspectJ实现
  13. springboot系列六、springboot配置错误页面及全局异常
  14. Executor框架(转载)
  15. Genius ACM(倍增+归并排序)
  16. linux openfire mysql_Linux系统安装openfire及其如何后台运行openfire
  17. 荣耀4a鸿蒙,华为荣耀4A上手评测:599元也可以很拉轰
  18. MySQL 数据库单表查询——高级查询
  19. 2023 IEEE Fellow出炉:唐立新、宗成庆、朱军、姬水旺、李佳等入选
  20. 2022高处安装、维护、拆除考试题库模拟考试平台操作

热门文章

  1. linux的QQ安装在哪个文件夹,linux安装QQ
  2. 阿帕奇服务器文件上传,windows基于阿帕奇+PHP服务器,实现vc++文件上传功能
  3. Mac OS X的入门文档
  4. macbook设置充电上限
  5. 基于同义词词林扩展版的词语相似度计算
  6. 什么叫明文,什么叫密文,为什么不允许在数据库里明文保存密码?
  7. Batch批处理最全学习教程
  8. 用php写出一个网站的模板,25 个 PHP 的 Web 开发程序网站模板
  9. SEO优化师王永仙说:网页title设置及描述设置和URL优化及网站地图优化(sitemap)...
  10. Excel下的数据挖掘:学生成绩统计分析实战之总体分析