728x90

openCV로 imread를 하고 imshow 메소드를 쓸 때 다음과 같은 에러가 발생한다.

 

cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-memyuvq3\opencv\modules\highgui\src\window.cpp:651: 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 을 입력해서 라이브러리를 삭제 한 뒤에,
pip install opencv-python을 입력해서 재설치해주면 된다.

끝.

728x90

+ Recent posts