Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cv2.imshow returns error #143

Open
samlaf opened this issue Jun 29, 2021 · 0 comments
Open

cv2.imshow returns error #143

samlaf opened this issue Jun 29, 2021 · 0 comments

Comments

@samlaf
Copy link

samlaf commented Jun 29, 2021

I'm on Ubuntu 20.04, opencv4.5.2 (downloaded via pip3 install opencv-python).
When running python3 demo.py I was getting

Traceback (most recent call last):
  File "demo.py", line 136, in <module>
    main()
  File "demo.py", line 128, in main
    cv2.imshow("result", img)
cv2.error: OpenCV(4.5.2) /tmp/pip-req-build-itd46xp8/opencv/modules/highgui/src/window.cpp:679: 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'

Following https://stackoverflow.com/a/14656610/4971151, I installed opencv-contrib-python and it solved the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant