Traceback (most recent call last):
File “/home/data/PJS/test_bed/img_show.py”, line 18, in
cv2.imshow(‘img’, img)
cv2.error: OpenCV(4.5.3) /tmp/pip-req-build-9gwtlx3c/opencv/modules/highgui/src/window.cpp:1274: 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’
Solution:
$ sudo apt install libgtk2.0-dev pkg-config
$ pip uninstall opencv-python opencv-contrib-python
$ pip install opencv-python
Read More:
- [Solved] error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows
- [Solved] Python opencv imshow Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow
- [Solved] cv2.error: (-215:Assertion failed) encoder->isFormatSupported(CV_8U) in function ‘imwrite_‘
- [Solved] cv2.error: OpenCV(4.5.1) XXX\shapedescr.cpp:315: error: (-215:Assertion failed) npoints >= 0 &&……
- [Solved] error: (-215:Assertion failed) size.width>0 && size.height>0 in function ‘imshow‘
- [Solved] cv2.xfeatures2d.SIFT_create() Error: module ‘cv2.cv2’ has no attribute ‘xfeatures2d’
- [Solved] error: (-215:Assertion failed) !_src.empty() in function ‘cv::cvtColor‘
- v2.error: OpenCV(4.5.5) error: (-215:Assertion failed) npoints > 0 in function ‘cv::drawContours‘
- [Solved] cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function “pointPolygonTest“
- [Solved] cv2.error: OpenCV(4.5.3) :-1: error: (-5:Bad argument) in function ‘circle‘
- Opencv Python realizes the paint filling function in PS, one click filling color and the possible reasons for opencv’s frequent errors
- RuntimeError: Not implemented on the CPU [How to Solve]
- [Solved] RuntimeError: “unfolded2d_copy“ not implemented for ‘Half‘
- [Solved] AttributeError: ‘PngImageFile‘ object has no attribute ‘imshow‘
- [Mac Pro M1] Python3.9 import cv2 Error: Reason: image not found
- Import CV2 & Numpy report red Warning and Error [How to Solve]
- How to Solve Opencv Reads Video Error: cv2.error
- [Solved] Import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- ROS generate_messages_cpp [Compiler error resolution]