OpenCV in Anaconda imshow crash (Kubuntu)
On Kubuntu LTS 16.04 I have installed Anaconda 4.3.14 with Spyder 3.1.2 and have tried for days to get OpenCV to install and work correctly. Finally I installed it using the following command:
conda install -c https://conda.binstar.org/menpo opencv
When I tried to run a script though, while Python (3.6) imports the cv2 library correctly, and cv2.imshow() outputs the image in a window as intended, but when I try to close the image window (either by key or by X button) it stops responding and the kernel dies.
import cv2
img = cv2.imread('image.jpg',0)
cv2.imshow('image',img)
cv2.waitKey(0)
cv2.destroyAllWindows()
There used to be two messages when the kernel tried to reboot (even though I had both of these libraries):
(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
Gtk‑WARNING *: Unable to locate theme engine in module_path: "adwaita"
But now I've installed some packages / libraries and no message appears any more, just the kernel dies