This application failed to start because it could not find or load the Qt platform plugin xcb

This application failed to start because it could not find or load the Qt platform plugin "windows" 简述 错误描述 解决方案简述vs2013 + Qt 的编程环境,用debug模式运行一切OK,一旦用 Release 模式,就报以下错误。经过Google,百度,有的人说需要添加什么代码,有人说需要复制整个plugin文件夹,有人说需要复制整个platforms 文件夹,他们说的都不完全对。以下才是亲测可行的解决方案。错误描述This application failed to start beca 阅读详情

1.Background:

I download labelImg from github(labelImg), and want to modify the source code to add my special functionnalities. And I configure the PyQt5 according to the mannul  as follows:

first: open anaconda and cd to the labelImg folder

second:type in follows command

sudo apt-get install pyqt5-dev-tools
sudo pip3 install -r requirements/requirements-linux-python3.txt
make qt5py3
python3 labelImg.py
python3 labelImg.py [IMAGE_PATH] [PRE-DEFINED CLASS FILE]

when I run the "python3 labelImg.py", I encounter this error:

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, xcb.Reinstalling the application may fix this problem.

My enviroment is:Ubuntu16.04, Anaconda 3, python3.7, I googled all the network, and try many methods, it doesn't work for me. And at last, I solved the error through following steps:

2.Solutions

2.1 Enable the Qt plugin debug information to get hidden hint

sudo gedit ~/.bashrc

add follows sentence to the end:

export QT_DEBUG_PLUGINS=1

then

source ~/.bashrc

2.2 Run the python labelImg.py again

I got follows information:

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/jiaken2660/anaconda3/bin/platforms" ...
Cannot load library /home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/home/jiaken2660/Qt5.9.9/5.9.9/gcc_64/lib/libQt5XcbQpa.so.5: symbol _ZNK15QPlatformWindow15safeAreaMarginsEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/home/jiaken2660/Qt5.9.9/5.9.9/gcc_64/lib/libQt5XcbQpa.so.5: symbol _ZNK15QPlatformWindow15safeAreaMarginsEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
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, xcb.

because my python path is:

/home/jiaken2660/anaconda3/bin/python

you can see libqxcb.so calls the "/home/jiaken2660/Qt5.9.9/5.9.9/gcc_64/lib/libQt5XcbQpa.so.5" which mismatched in my computer. The former is a version which installed before for QtCtreator, and the truely matched libQt5XcbQpa.so.5 is under follows folder, and should match the PyQt5 library.

/home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/lib/libQt5XcbQpa.so.5

So, modify ~/.bashrc file

export LD_LIBRARY_PATH=/home/jiaken2660/anaconda3/envs/PyQt5/lib/python3.7/site-packages/PyQt5/Qt/lib:$LD_LIBRARY_PATH

and add the plugin enviroment variable.

export QT_PLUGIN_PATH=/home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins

After this, the qt plugin matched the qt library,such as libQtCore, libQtGui etc. But I get another error, please see below:

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/home/jiaken2660/anaconda3/bin/platforms" ...
Cannot load library /home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/lib/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/jiaken2660/anaconda3/envs/PyQt5/lib/python3.7/site-packages/PyQt5/Qt/lib/libQt5XcbQpa.so.5))
QLibraryPrivate::loadPlugin failed on "/home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so" : "Cannot load library /home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so: (/home/jiaken2660/anaconda3/lib/python3.7/site-packages/PyQt5/Qt/lib/libQt5Core.so.5: version `Qt_5.15' not found (required by /home/jiaken2660/anaconda3/envs/PyQt5/lib/python3.7/site-packages/PyQt5/Qt/lib/libQt5XcbQpa.so.5))"
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, xcb.

Reinstalling the application may fix this problem.

the error is:version `Qt_5.15' not found, beacuse the PyQt5 installed is 5.9.2, so just reinstall the PyQt5:

pip install PyQt5==5.15.0

then all the errors gone. disable the QT_DEBUG_PLUGINS=1 at last. That's it. unfortunately, I spent one day to get it work.

This application failed to start because it could not find or load the Qt platform plugin "xcb"问题解决方 我在打开anaconda中内嵌的spyder的时候报出如下错误 【报错】: This application failed to start because it could not find or load the Qt platform plugin "xcb"【原因】:    QT插件目录没有声明或者声明错误 【改正】:    声明QT插件的位置,CTL+ALT+T 打开命 阅读详情

相关推荐

【Qt】Qt发布程序时,报错: could not find or load the Qt platform plugin "xcb"

问题描述 Qt程序在发布时,报错: This application failed to start because it could not find or load the Qt platform plugin “xcb” in “”. Reinstalling the application may fix this problem Aborted (core dumped) ...

郭老二 2万+

Qt报错This application failed to start because it could not find or load the Qt platform plugin “windo

Qt运行时报错: This application failed to start because it could not find or load the Qt platform plugin "windows" Reinstalling the application may fix this problem. 解决办法: QT为了简化生成发布版本,特别提供了工具 "windeployqt.exe",这个工具在 "...\Qt5.8.0\5.8\msvc2015_64\bin"的目录下,通过该

Mmagic1的博客 8478

成功解决This application failed to start because it could not find or load the Qt platform plugin “windo

​ 成功解决This application failed to start because it could not find or load the Qt platform plugin “windows” in "!Reinstalling the application may fix this problem. 目录 解决问题 解决思路 解决方法 解决问题 This application failed to start because it could not find or

头部AI社区如有邀博主AI主题演讲请私信—心比天高,仗剑走天涯,保持热爱,奔赴向梦想!低调,专注,谦虚,自律,反思,成长,还算比较正能量的博主,公益免费传播…内心特别想在AI界做出一些可以推进历史进程影响力的技术(兴趣使然,有点小情怀,也有点使命感呀 3351

This application failed to start because it could not find or load the Qt platform plugin windows

一、问题出现 在win7 x64系统下,使用Qt5.6.2 MinGW32开发的程序,在本机运行没问题,可是把.exe和用到的.dll打包发到别人电脑上却运行不了,报错如下: 二、原因分析 为什么会这样?这是因为程序运行需要Qt本身的一些dll动态库,把这些缺失的dll补上就可以了。需要注意的是:一般遇到这个报错,是缺少plugins文件夹下的platforms和imageformats两个文件夹内的dll动态库。 三、解决办法 因此,解决办法就是将Qt安装目录下对应的动态库dll文.

woshisaoge的专栏 1万+

WSL2迁移后用户名不见了?一招教你快速恢复Ubuntu22.04默认用户

本文针对WSL2迁移后Ubuntu 22.04默认用户名丢失的常见问题,提供了详细的诊断与修复方案。通过分析迁移底层逻辑,指导用户使用`ubuntu2204.exe config --default-user`命令或配置`/etc/wsl.conf`文件快速恢复用户身份,并涵盖权限修复、冲突解决及自动化迁移脚本等进阶内容,确保子系统迁移后环境完整可用。

web39explorer的博客 561

Win11任务栏图标消失?快速恢复指南

任务栏图标消失是Windows 11操作系统中常见的问题之一,但通过上述方法,用户通常可以轻松解决这一问题。无论是重启Windows资源管理器、使用命令提示符修复、检查系统更新和设置,还是考虑重装系统,都可以帮助用户恢复任务栏图标的正常显示。希望本文的介绍能对用户有所帮助,让Windows 11的使用更加顺畅和愉快。

mmoo_python的博客 5416

This application failed to start because it could not find or load the qt platform plugin “xcb“

This application failed to start because it could not find or load the qt platform plugin “xcb"

iccoke的博客 1472

群晖Hyper Backup还原实战:加密与非加密备份的完整操作指南

本文详细介绍了群晖Hyper Backup在加密与非加密备份场景下的完整还原操作指南。通过实战案例和高级技巧,帮助用户应对硬盘故障或系统崩溃时的数据恢复挑战,特别是加密备份恢复中的关键节点和常见陷阱。

weixin_29323365的博客 448

This application failed to start because it could not find or load the Qt platform plugin "xcb".

linux系统下Qt5编译好的程序在未安装Qt的系统下运行会报以下错误: This application failed to start because it could not find or load the Qt platform plugin "xcb". Reinstalling the application may fix this problem. 出现这个错误,主要是

程序人生的专栏 11万+

GIS小白也能看懂的实战:5步教你将ArcGIS里的等高线和水系完美导入CAD做规划图

本文详细介绍了如何将ArcGIS中的等高线和水系数据高效导入CAD,制作专业规划底图的5个关键步骤。从数据准备、ArcGIS处理到CAD优化,涵盖坐标系设置、数据裁剪、格式转换等实用技巧,特别适合设计规划领域的新手快速掌握GIS与CAD协同工作流程。

weixin_27966471的博客 430

STM32F401RCT6最小系统原理图设计

STM32F401RCT6最小系统原理图设计一、主控芯片二、电源电路三、晶振电路三、下载电路四、完整电路图      本文章基于STM32F401RCT6进行最小系统原理图设计,包含主控芯片,电源,晶振电路,下载电路等几部分 一、主控芯片 主控芯片采用STM32F401RCT6,需注意: VBAT在不接电池的情况下需接3.3V,VDDAVREF+需接3.3V,否则会造成芯片供电不正常,无法启动和识别的情况 VDDAVREF+和VCAP1处电容需按照规格书

weixin_43278295的博客 2万+

This application failed to start because it could not find or load the Qt platform plugin “xcb“

非root用户,Ubuntu 18系统,运行anaconda-navigator时,出现以下错误 This application failed to start because it could not find or load the Qt platform plugin "xcb" in "". 找了很多答案都没能解决我的问题 "Failed to load platform plugin "xcb" " while launching qt5 app on linux without qt

weixin_43912749的博客 1750

如何借助Gemini 3 Pro完成一篇文献精读?(劝收藏)

金句必须是原文的完整句子,并附上该句子在文中的大致位置。你是一名资深科研文献评估专家,请根据我提供的文献信息(标题、作者、期刊、时间、引用、摘要、结论、图表)依次输出:①影响力评估:按期刊、作者、时间、引用、问题重要性给出1–10分及简述;用上述方法再结合Gemini 3 Pro的辅助,原本需要3小时才能读完一篇文献,现在只需50分钟,不管是顶刊论文还是领域内冷门论文,都可以用这套方法,另外七哥设计的高阶精读提示词,需根据自己的文献内容做调整,希望这篇文章的方法能帮你高效精读文献,掌握文献的精华内容。

智能AI让学术科研更容易 1306

This application failed to start because it could not find or load the Qt platform plugin "xcb" in "

This application failed to start because it could not find or load the Qt platform plugin “xcb” in “ python 运行xx.py文件报错背景tensorflow1.2+python3.5+numpy+matplot下跑一个简单的神经网络的可视化小程序。 error 1:找不到 python3-tk 这个包。

ppj992346029的专栏 6729

Python爬虫实战:如何爬取12306列车信息

本文介绍了如何使用Python编写爬虫,抓取12306列车信息。我们讲解了如何分析12306的列车数据接口,如何发送HTTP请求,解析返回的JSON数据,并将数据保存到本地文件中。我们还讨论了如何绕过反爬虫机制,如使用随机User-Agent和设置请求延时。通过这个实战项目,你应该掌握了如何爬取并解析来自公共API的数据,同时提高了你的爬虫技能。这些技能不仅适用于12306列车信息抓取,也可以广泛应用于其他需要抓取JSON数据的网站。

2201_76125261的博客 1928

10、贝叶斯曲线拟合与预测分布详解

本文详细介绍了贝叶斯曲线拟合与预测分布的核心概念与计算方法。从最大似然估计出发,引入参数的先验分布,推导出后验分布与最大后验估计,并进一步展示如何通过积分获得完整的预测分布。文章解析了预测分布中均值与方差的构成,强调贝叶斯方法在量化不确定性方面的优势,涵盖金融、医疗、气象等实际应用场景。最后总结了操作步骤与未来研究方向,帮助读者系统掌握贝叶斯方法在回归问题中的应用。

android的专栏 110

This application failed to start because it could not find or load the Qt platform plugin “xcb”解决方法

1.This application failed to start because it could not find or load the Qt platform plugin “xcb” The correct solution is running the following comand onto a terminal: sudo ln -sf /usr/lib/x86_64-l...

小猪的博客 1208

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

This application failed to start because it could not find or load the Qt platform plugin “xcb“.

BUG: This application failed to start because it could not find or load the Qt platform plugin "xcb". Reinstalling the application may fix this problem. Aborted 解决办法: $ gedit ~/.bashrc insert next path at the end of the file export LD_LIBRARY

724

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

贝叶斯统计 [韦来生编]

贝叶斯(Bayes)统计是近几十年来迅速发展起来的数理统计的一个重要分支。贝叶斯方法与经典统计方法的主要不同之处是进行统计推断时除了利用样本信息外,还要利用参数的先验信息,因此可以提高统计推断或统计决策的效果。它在经济、金融、生物、医学、自然科学和社会科学等许多领域具有广泛的应用。贝叶斯方法的研究已渗透到了统计学的几乎所有领域。作者在给中国科学技术大学概率论与数理统计专业本科生开设的“数理统计”课程中有一章专门讲授“贝叶斯方法和统计决策理论”,近十年来也给中国科学技术大学概率统计专业研究生开设过几次“贝叶斯分析”课。本书是在对过去讲稿的内容作了适当的增减和调整的基础上完成的。  本书共分六章。第1章是绪论,介绍了贝叶斯统计的若干基本概念,同时对必要的数理统计的基础知识有重点地作了回顾。第二章介绍了确定先验分布的若干可供选择的方法。第三章介绍了几类常见统计模型参数的后验分布的主要结果和计算方法。第四章和第五章分别介绍了“贝叶斯统计推断”和“贝叶斯统计决策”的内容。第六章介绍了贝叶斯统计计算的若干方法,包括蒙特卡洛方法和马尔可夫链蒙特卡洛(MCMC)方法以及相关统计软件的简介。本书的每一章附右大量的例题和习题,书末附有常用的几个表格和部分习题解答供读者查用。  大约可在54学时内讲授本书的第1章至第六章的主要内容,教师可根据学时需要选讲本书第1章至第六章的部分内容。书中标“*”号的章节可略去不讲,留给读者作为阅读材料。第六章例题中的R代码和部分例题的数据文件等可从作者个人主页下载。  作者在编写本书的过程中参考了J.O.Berger教授的《统计决策论及贝叶斯分析》和茆诗松教授编写的《贝叶斯统计》等书中的一些内容,以及《贝叶斯分析》一书中由张伟平博士编写的有关贝叶斯统计计算的一些内容。在此表示衷心感谢。  本书编写准备过程中,中国科学技术大学统计与金融系的几个研究生帮助完成了本书部分中文的录入和排版,作者对他们的辛勤工作表示真诚的感谢。高等教育出版社为本书的出版给予了大力支持。在此一并致谢。

This application failed to start because it could not find or load the QT platform plugin "xcb" in""

  OS:Ubuntu 16.04 Tools:Python、PyQt5 问题1说明: 本人使用PyQt5写了一个桌面应用,并使用Pyinstaller进行程序打包,在本机测试可执行文件是没有问题的,但是在其他的Ubuntu系统上进行测试时报错: This application failed to start because it could not find or load the ...

panhtt的博客 1006

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

This application failed to start because it could not find or load the Qt platform plugin "xcb"

安装完anaconda,打开spyder时,出现This application failed to start because it could not find or load the Qt platform plugin “xcb”。如图 谷歌好久终于找到解决方案。步骤如下:sudo gedit ~./bashrc [在最后一行写入]export QT_PLUGIN_PATH=<你自己安装a

GAN_player的博客 3999

解决:This application failed to start because it could not find or load the Qt platform plugin “xcb“

Linux系统下在未安装Qt相关组件时运行用Qt5编译好的程序会报以下错误: This application failed to start because it could not find or load the Qt platform plugin "xcb". 出现这个错误,一般是因为缺少Qt5中的一个库文件依赖,即 libqt5dbus.so.5 打开终端用以下命令即可解决: sudo apt-get install libqt5dbus5 一般在再运行相关软件都可以成功了.

龙雪的博客 7857
上一篇: TensorRT was linked against cudnn 7.6.3 but loaded cudnn 7.4
下一篇: LoadLibraryA返回NULL
jiaken2660
博客等级 码龄22年 10粉丝 31原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址