face_recognition icon indicating copy to clipboard operation
face_recognition copied to clipboard

macOS runtime OpenCV Error

Open shiliufu369 opened this issue 9 years ago • 2 comments

  • 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

shiliufu369 avatar May 22 '17 05:05 shiliufu369

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.

ageitgey avatar May 22 '17 17:05 ageitgey

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?

yychenca avatar Oct 30 '17 15:10 yychenca