OpenCV: use imshow on mac

I want to show an image from OpenCV in and Python on mac:

cv2.imshow ('image', img)

However, I get:

/Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Users/aaa/PycharmProjects/untitled/aaa.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 "/Users/AAAA/PycharmProjects/untitled/aaa.py", line 32, in <module>
    cv2.imshow('image',img)
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

However, what can I do on a Mac? apt-get does not work, of course ...

+4
source share

Source: https://habr.com/ru/post/1676844/


All Articles