macOS runtime OpenCV Error
- face_recognition version: The latest Python version: python 2.7.13 Operating System: MAC OS 10.12.4 Description
$ python facerec_from_webcam.py OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp, line 583 Traceback (most recent call last): File "facerec_from_webcam.py", line 44, in cv2.imshow('Video', frame) cv2.error: /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp:583: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon 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
The error message points out the error. facerec_from_webcam.py tries to open a window on your desktop to display the output of your webcam. But your copy of opencv isn't compiled with support for showing desktop windows. So you have to recompile it with Windows, GTK+ 2.x or Carbon support or the example can't run.
I ran into the same issue. Have uninstalled/ reinstalled opencv for several times but it's still not resolved. @shiliufu369 and @ageitgey, could you please shed some light?