linux问题解决记录:qt.qpa.plugin: Could not find the Qt platform plugin “wayland“ in ““
时间:2024-04-28 21:40:23 来源:网络cs 作者:焦糖 栏目:卖家故事 阅读:
linux问题解决记录:qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in ""
一、问题分析:~~二、解决方法:(没解决)~~1、安装qtwayland52、安装好后查看位置3、Linux添加环境变量,全局生效 二. 解决方法
一、问题分析:
matplotlib库的调用有问题,可能是找不到wayland插件;
二、解决方法:(没解决)
1、安装qtwayland5
sudo apt-get install qtwayland5
显示qtwayland5 已经是最新版 (5.15.3-1),安装好了。若安装中出现问题,参考:dpkg: 处理软件包 xxx (–configure)时出错解决方法
2、安装好后查看位置
sudo find / -name qtwayland5
/usr/share/doc/qtwayland5
3、Linux添加环境变量,全局生效
/etc/profile []
sudo vim profile
export QT_QPA_PLATFORM=/usr/share/doc/qtwayland5:$PATH
echo $QT_QPA_PLATFORM
空的
在命令行直接
export QT_QPA_PLATFORM=/usr/share/doc/qtwayland5:$PATH
问题:
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, webgl, xcb
安装libxcb-xinerama库:Ubuntu18.04下解决Qt出现qt.qpa.plugin:Could not load the Qt platform plugin “xcb“问题
#如果还存在其他依赖库没有安装,也一并安装。$ sudo apt-get install libxcb-xinerama0
二. 解决方法
重新安装matplotlib ,重启linux
问题消失
出现新问题:
QObject::moveToThread: Current thread (0x99161300) is not the object's thread (0x991308c0). Cannot move to target thread (0x99161300) qt.qpa.plugin:Could not load the Qt platform plugin “xcb“
关注pyqt和opencv版本冲突问题
参考以上报错是由于使用 conda 安装 pyqt ,用 pip 安装 opencv ,由版本冲突导致的
具体解决步骤
卸载当前PYQT
conda uninstall pyqt
pip安装pyqt 和opencv
pip install PyQt5
pip install opencv-python-headless
可正常运行
阅读本书更多章节>>>>本文链接:https://www.kjpai.cn/gushi/2024-04-28/163349.html,文章来源:网络cs,作者:焦糖,版权归作者所有,如需转载请注明来源和作者,否则将追究法律责任!
下一篇:返回列表