win中python中OpenCV使用cv2.imshow()报错的解决办法

慈云数据 2024-06-15 技术支持 44 0

1. 问题

Cv2.error: OpenCV(4.9.0) D:\a\opencv-Python\opencv-python\opencv\modules\highgui\src\window.cpp:1272: 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'

2. 解决

 pip install opencv-contrib-python

在这里插入图片描述

在这里插入图片描述

微信扫一扫加客服

微信扫一扫加客服

点击启动AI问答
Draggable Icon