python

AttributeError: partially initialized module 'cv2' has no attribute '_registerMatType'

jiheek 2022. 8. 3. 16:51

상위 버전에서는 해당 기능이 사라졌다고 한다. 4.3 이하의 버전을 설치해줘야 한다고 함

 

해결방법

!pip install "opencv-python-headless<4.3"

 

 

https://github.com/opencv/opencv-python/issues/591

 

ImportError: cannot import name '_registerMatType' from 'cv2.cv2' · Issue #591 · opencv/opencv-python

Trying to import cv2 in python 3.9.2 gives me the following error: File "C:\Users\My Name\AppData\Local\Programs\Python\Python39\lib\site-packages\cv2_init_.py", line 9, in from .cv2 impo...

github.com