win中python中OpenCV使用cv2.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'

2. 解决

 pip install opencv-contrib-python

在这里插入图片描述

在这里插入图片描述

最近更新

  1. TCP协议是安全的吗?

    2024-05-04 00:28:03       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-05-04 00:28:03       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-05-04 00:28:03       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-05-04 00:28:03       20 阅读

热门阅读

  1. opencv t函数

    2024-05-04 00:28:03       10 阅读
  2. Python之字符串,列表,元组,字典之间的转换写法

    2024-05-04 00:28:03       12 阅读
  3. Linux 设置一个程序开机启动的几种方式

    2024-05-04 00:28:03       16 阅读
  4. golang中数组array和切片slice的区别

    2024-05-04 00:28:03       10 阅读
  5. Go怎么实现map并发安全的三种方式

    2024-05-04 00:28:03       12 阅读
  6. 669.修建二叉搜索树

    2024-05-04 00:28:03       14 阅读
  7. 【Flask 系统教程 3】请求与响应

    2024-05-04 00:28:03       13 阅读
  8. oracle杀死锁时如果是多机并行怎么查

    2024-05-04 00:28:03       13 阅读