当前位置:   article > 正文

win中python中OpenCV使用cv2.imshow()报错的解决办法_cv2.error: opencv(4.9.0) :-1: error: (-5:bad argum

cv2.error: opencv(4.9.0) :-1: error: (-5:bad argument) in function 'imshow

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'
  • 1

2. 解决

 pip install opencv-contrib-python
  • 1

在这里插入图片描述

在这里插入图片描述

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/658731
推荐阅读
相关标签
  

闽ICP备14008679号