_imshow(winname.encode("unicode_escape").decode(), mat) cv2.error: OpenCV(4.10.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1301: 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'
没有安装cv2扩展包
- 首先尝试安装
opencv-contrib-python
: pip install opencv-contrib-python
- 如果上述方法不奏效,确保您安装的
opencv-contrib-python
版本与opencv-python
版本相匹配