栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

cv2.imshow error: The function is not implemented. Rebuild the library with Windows...

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

cv2.imshow error: The function is not implemented. Rebuild the library with Windows...

在python中调用cv2.imshow,出现这个一个报错:

cv2.error: OpenCV(4.5.5) D:aopencv-pythonopencv-pythonopencvmoduleshighguisrcwindow.cpp:1268: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvShowImage'

解决办法:安装 opencv-contrib-python

pip install opencv-contrib-python

Collecting opencv-contrib-python
  Downloading opencv_contrib_python-4.6.0.66-cp36-abi3-win_amd64.whl (42.5 MB)
     |████████████████████████████████| 42.5 MB 234 kB/s
Requirement already satisfied: numpy>=1.17.3 in e:anaconda3envstorchlibsite-packages (from opencv-contrib-python) (1.21.5)
Installing collected packages: opencv-contrib-python
Successfully installed opencv-contrib-python-4.6.0.66

PS: 看源码,imshow正常来讲是在highgui中的,不会依赖contrib。不清楚是否是最新的库中调用了新的函数。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/990017.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号