前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >OpenCV2报错:Could not find the Qt platform plugin "cocoa" in ""

OpenCV2报错:Could not find the Qt platform plugin "cocoa" in ""

作者头像
一只特立独行的兔先生
发布2020-04-02 21:37:46
5.8K0
发布2020-04-02 21:37:46
举报

OpenCV2报错:Could not find the Qt platform plugin "cocoa" in ""
  • 一.背景信息
  • 二.错误现象
  • 三.解决方法


一.背景信息

在这里插入图片描述
在这里插入图片描述

OpenCV是一个基于BSD许可(开源)发行的跨平台计算机视觉库,可以运行在Linux、Windows、Android和Mac OS操作系统上。它轻量级而且高效——由一系列 C 函数和少量 C++ 类构成,同时提供了Python、Ruby、MATLAB等语言的接口,实现了图像处理和计算机视觉方面的很多通用算法。今天在安装OpenCV2时出现了qt.qpa.plugin: Could not find the Qt platform plugin “cocoa” in ""This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.的错误,解决并记录于此,具体错误现象如下


二.错误现象

qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

三.解决方法

第一种解决方法:

pip install opencv-python==4.0.0.21  ####安装旧版本的OpenCV2

第二种解决方法:

pip uninstall opencv-python    ####卸载已经安装的最新版本
pip install opencv-python-headless  ####然后安装非官方的OpenCV2库
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • OpenCV2报错:Could not find the Qt platform plugin "cocoa" in ""
  • 一.背景信息
  • 二.错误现象
  • 三.解决方法
相关产品与服务
图像处理
图像处理基于腾讯云深度学习等人工智能技术,提供综合性的图像优化处理服务,包括图像质量评估、图像清晰度增强、图像智能裁剪等。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档