问题如题

记录一下解决步骤如下:

1、第一步、安装OpenCV的拓展开发包

pip install opencv-contrib-python -i https://pypi.tuna.tsinghua.edu.cn/simple/

2、安装后执行报错

AttributeError: partially initialized module ‘cv2’ has no attribute ‘_registerMatType’ (most likely due to a circular import)

3、最后一步

因为opencv-python 从4.3.0 and 3.4.10 build的包对老版本系统兼容性不好,解决方法:

pip install opencv-python install "opencv-python-headless<4.3" -i https://pypi.tuna.tsinghua.edu.cn/simple/

打完收工,特此记录

Logo

技术共进,成长同行——讯飞AI开发者社区

更多推荐