python app-xcb插件失败 [英] python app - xcb plugin fail

查看:177
本文介绍了python app-xcb插件失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的设置:带有anaconda的Python 2.7

My setting: Python 2.7 with anaconda

最近我已经安装了OpenCV 3.0,当我尝试执行简单的图像显示或者我想运行OpenCV随附的python示例时,出现错误消息:

Recently I have installed OpenCV 3.0 and when I try to do simple image display or I want to run python samples that come with OpenCV, there is a error message:

此应用程序无法启动,因为无法找到或加载Qt平台插件"xcb".

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

我已经阅读了很多需要将.so文件附加到我的项目中的注释,但是我认为这不是最佳解决方案,因为对于大多数人来说,它是开箱即用的.

I have read many comments that I need to attach .so files to my project but I don't think it's the optimal solution since for most people it works out of a box.

我不知道该怎么办.我没经验.我想到的只是重新安装所有内容.

I have no clue what to do. I'm inexperienced. What comes to my mind is only to reinstall everything.

推荐答案

Qt5在OpenCV 3.1.0中可以正常工作. 对我有用解决"xcb"错误.

Qt5 works fine with OpenCV 3.1.0. This is what worked for me for resolving the "xcb" error.

很显然,Anaconda qtpyqt 软件包(v4)是遮蔽系统v5版本.

Apparently the Anaconda qt and pyqt packages (v4) were shadowing the system v5 version.

如果要使用Qt5,请尝试通过以下方式将其删除:

If you want to work with Qt5 try removing these via:

conda remove qt
conda remove pyqt

(Ubuntu 16.04,OpenCV 3.1.0,Anaconda 4.1.1,Qt 5)

(Ubuntu 16.04, OpenCV 3.1.0, Anaconda 4.1.1, Qt 5)

这篇关于python app-xcb插件失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆