0

the error is :

cv2.error: OpenCV(4.5.4) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1257: 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 'cvNamedWindow'

Marry
  • 1
  • "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 'cvNamedWindow'"—this seems pretty clear to me. How did you install `cv2`? On what operating system? – ChrisGPT was on strike Apr 15 '22 at 19:08
  • I just paste this comment in the terminal pip install opencv-python – Marry Apr 15 '22 at 19:11
  • I'm using visual studio code -python – Marry Apr 15 '22 at 19:46
  • I asked what _operating system_ you are using. – ChrisGPT was on strike Apr 15 '22 at 20:05
  • i am using windows – Marry Apr 15 '22 at 20:56
  • you installed the `headless` OpenCV package. remove that package. install a package that isn't headless. install exactly one opencv package, not multiple. -- and since you're new, please take the [tour] and review [ask]. you're expected to **search** for the error and only ask if you didn't find an answer. – Christoph Rackwitz Apr 15 '22 at 22:30

0 Answers0