error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support

I had the exact same error using yolov5, on windows 10. Rebuilding the library by typing

pip uninstall opencv-python 

then

pip install opencv-python

worked for me.

Leave a Comment