-1

I'm working on the one project, which use opencv-python. truble is non-working but very important function cv2.imshow(). I've tryed to use other way to show image but it isn't work with non-downloaded image and i can't download picture due to restrition of my project. Let be laconistic. Code: https://pastebin.com/N3h7dnx2 Error's text: cv2.error: OpenCV(4.6.0) D:\a\opencv-python\opencv-python\opencv\modules\highgui\src\window.cpp:1267: 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'

P.S. That can beimportant, in error's text indicated the path through the disk D, but my disk В is absolutly empty

I've millions times written pip uninstall opencv-python and then pip install opencv-python

I've installed opencv-python-headless

Christoph Rackwitz
  • 11,317
  • 4
  • 27
  • 36
AllChai_
  • 7
  • 1
  • 1
    Please post a [mre] with your (minimal) code in the question itself rather than on an external site. – beaker Dec 07 '22 at 15:31
  • 3
    "I've installed opencv-python-headless" - the headless version won't do windows. Don't use it if you want to show images. – AKX Dec 07 '22 at 15:35
  • "indicated the path through the disk D" -- that is referring to the location of source code from which it was built, on some machine other than yours (since you've installed a pre-built package). – Dan Mašek Dec 07 '22 at 16:36
  • Please provide enough code so others can better understand or reproduce the problem. – Community Dec 07 '22 at 18:59
  • [tour], [ask], [mre]. google your error message. you would have gotten your answer right away. – Christoph Rackwitz Dec 08 '22 at 18:14
  • Does this answer your question? [error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support](https://stackoverflow.com/questions/67120450/error-2unspecified-error-the-function-is-not-implemented-rebuild-the-libra) – Christoph Rackwitz Dec 08 '22 at 18:14

1 Answers1

0

I've installed opencv-python-headless

The headless version has the advantage of having zero dependencies on GUI bindings, and the disadvantage of not being able to pop up an image in your GUI. It is designed for folks who strictly want to turn input image files into output image files, or compute image stats.

When installing the stack, use bindings appropriate for your OS, avoiding the -headless package.

J_H
  • 17,926
  • 4
  • 24
  • 44