imshow and osx

asked 2016-12-23 05:55:35 -0500

m31 gravatar image

Dear all, I have trouble with making imshow working on osx. I am using pyCharm to code with opencv 3.1.0_4 It seems to be common but I never found any solution. img = cv2.imread('./imageTuto.jpeg') cv2.imshow('image',img)

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 545 
Traceback (most recent call last):
  File "/Users/maxime/Library/Preferences/PyCharm2016.2/scratches/scratch_1.py", line 7, in <module>
    cv2.imshow('image',img)
cv2.error: /Users/travis/build/skvark/opencv-python/opencv/modules/highgui/src/window.cpp:545: 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
edit retag flag offensive close merge delete

Comments

Simply said, your system has no running visualisation backend, and thus imshow cannot work. Why not install GTK as suggested.

StevenPuttemans gravatar imageStevenPuttemans ( 2016-12-23 05:58:17 -0500 )edit

doing so on osx is really a pain... it include remove every package installer to run jhbuild
https://wiki.gnome.org/Projects/GTK+/... but if i must...

m31 gravatar imagem31 ( 2016-12-25 15:23:02 -0500 )edit