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

安装新版mmdetection(mmdet=2.25.0, mmcv=1.5.3)报错。
因为opencv-python 从4.3.0 and 3.4.10 build的包对老版本系统兼容性不好,解决方法:

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

参考链接:https://github.com/opencv/opencv-python/issues/591#issuecomment-1005461211

你可能感兴趣的:(python,opencv,python)