3
votes

I've been using cv2 with anaconda successfully until I added:

cv2.waitKey(0)

receiving this error:

cv2.error: -------src-dir-------/opencv-2.4.10/modules/highgui/src/window.cpp:562: 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'm using conda 3.14.0 on Ubuntu 14.04.2 LTS and the packages in the error advice are installed

1
The order of installation matters. The error message says you must have libgtk2.0-dev and pkg-config installed before installing opencv2. - unutbu
I had opencv installed before anaconda. then i installed it again through anaconda. what should i do? - Rubber Duck
Did you uninstall opencv, install libgtk2.0-dev and pkg-config and then install opencv again? - unutbu
I did but im not sure what the anaconda installation did to that. it might be local - Rubber Duck
Is this problem fixed? I'm having the same problem here too. - Ébe Isaac

1 Answers

0
votes

This link may help you. https://groups.google.com/a/continuum.io/forum/m/#!msg/anaconda/uHB2wYT29vU/80ywinE9BAAJ.

In summary, you can try:

For opencv2.X

conda install -c https://conda.anaconda.org/menpo opencv