error: (-2:Unspecified error) The function is not implemented.

一.环境配置
windows10+pycharm+python3.9
二、问题描述

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.pip安装opencv-contrib-python,注意opencv-contrib-python版本和opencv版本要一致
分别运行以下命令:

卸载opencv-python-headless:

pip uninstall opencv-python-headless -y 

更新opencv版本:

pip install opencv-python --upgrade

四.解决啦
error: (-2:Unspecified error) The function is not implemented._第1张图片

你可能感兴趣的:(毕设,python,开发语言,pycharm,opencv)