Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

OpenCV not working properly with python on Linux with anaconda. Getting error that cv2.imshow() is not implemented

$
0
0

This is the exact error that I am getting. My OS is Ubuntu 16.10.

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 /feedstock_root/build_artefacts/work/opencv-3.1.0/modules/highgui/src/window.cpp, line 545Traceback (most recent call last): File "untitled.py", line 7, in cv2.imshow('image',img)cv2.error: /feedstock_root/build_artefacts/work/opencv-3.1.0/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

my code is:

import numpy as npimport cv2# Load an color image in grayscaleimg = cv2.imread('0002.png',0)cv2.imshow('image',img)cv2.waitKey(0)cv2.destroyAllWindows()

0002.png is an image in the same directory as the program.I first installed anaconda with python 3.5, then I installed opencv by using the command

conda install -c conda-forge opencv

I installed libgtk2.0-dev just as the error said to but I still get the same error.Any help would be much appreciated. I've been trying to solve this for several hours.


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>