项目场景:图像处理-python代码报错
cv2.imshow: 报Warning You might be loading two sets of Qt binaries into the same process
系统环境:
MAC M2芯片 MACOS 13.5.1
Python 3.7.1
Python库
cv2 4.2.0
opencv-python 4.4.0.44
问题描述
- cv2.imshow:
报Warning You might be loading two sets of Qt binaries into the same process
- 安装后报警Error:
import cv2
AttributeError: module 'cv2' has no attribute '_registerMatType'
原因分析:
参考:
- https://blog.51cto.com/doubleZ/5986533
- https://developer.aliyun.com/article/1124246
解决方案:
1 安装opencv-python-headless
2 安装低版本 opencv-python-headless<4.3
pip3 install opencv-python-headless==4.2.0.34