I've ubuntu 14.04(64-bit) installed on my machine.
I've python 3.6 and OpenCV 3 installed on it. When I'm trying to run the following line of code it throws error.
key = cv2.waitKey(0)
The error is as follows:
error: /feedstock_root/build_artefacts/opencv_1489510052062/work/opencv-3.1.0/modules/highgui/src/window.cpp:616: 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 cvWaitKey
I've installed the libgtk2.0-dev package but it doesn't got resolved. Do I need to install any other packages?
You are missing a few libraries that OpenCV depends on, it is very easy to install OpenCV on Linux, just use an install shell script and execute it. It will install all the dependencies and install OpenCV correctly, here is a
.sh
that I have used in the past:https://github.com/milq/milq/blob/master/scripts/bash/install-opencv.sh