在安装使用easyocr过程中,调用cv2报错

在安装使用easyocr过程中,调用cv2遇到了如代码所示的报错信息

cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1274: 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.先卸载opencv

pip uninstall opencv-python-headless
pip uninstall opencv-python

2.再下载opencv

pip install opencv-python

至此问题得以解决,easyocr也可正常使用

posted @ 2022-11-24 17:22  ~且听风吟~  阅读(382)  评论(0编辑  收藏  举报