cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:627: error: (-2:Unspecified error) The function is not implemented
(While running this code I am getting this error , I am using windows10 Pro 6bit OS)
import numpy as np
import cv2
img = cv2.imread('messi5.jpg',0)
cv2.imshow('image',img)
k = cv2.waitKey(0)
if k == 27: # wait for ESC key to exit
cv2.destroyAllWindows()
elif k == ord('s'): # wait for 's' key to save and exit
cv2.imwrite('messigray.png',img)
cv2.destroyAllWindows()
Traceback (most recent call last): File "C:\Users\DEBASISH\AppData\Local\Programs\Python\Python36\Projects\read_image.py", line 5, in <module> cv2.imshow('image',img) cv2.error: OpenCV(4.1.0) C:\projects\opencv-python\opencv\modules\highgui\src\window.cpp:627: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa 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'
(While running this code I am getting this error , I am using windows10 Pro 6bit OS)
what did you install there, and from where ?
this problem should not exist on windows.
yes right but for the first time i faced such issues, in my earlier installation in office Desktop, i had not faced such issues this issue i faced while installing in my laptop. and issue was resolved just by re-installing opencv-python using pip command
same problem on Ubuntu 18 , wtf. That worked though. Only took me 2 days, like 12 hours.