[opencv error] cv2.imshow :: rebuild the library

정예슬·2023년 4월 3일
0

침착한 일상

목록 보기
6/14

다음은 cv2 관련 라이브러리 업데이트 하다가 자주 발생하는 에러이다.

cv2.imshow 실행 시 다음과 같은 에러가 뜰 때

cv2.error: OpenCV(4.7.0) /io/opencv/modules/highgui/src/window.cpp:1272: 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'

$ pip uninstall opencv-python-headless

opencv-python-headless를 uninstall하면 문제가 해결된다.

이제 실수로든 아니든 cv 버전 바뀔 때마다 무슨 에러가 뜰까 심장이 떨려..

profile
춘식이랑 함께하는 개발일지

0개의 댓글