报错如下错误: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-python版本太高(我的python版本为3.11),用此命令先卸载,然后再下载个低版本的:
pip uninstall opencv-python
pip install opencv-python==4.5.5.64 -i https://pypi.tuna.tsinghua.edu.cn/simple
重新安装即可解决这个问题
参考博客:opencv运行出现问题_cpp:1272: error: (-2:unspecified error) the functi-CSDN博客