使用cv2是报错:AttributeError: module 'cv2.cv2' has no attribute 'bgsegm'报错原因:使用的python环境中没有安装扩展包contrib通过pip安装pip install opencv-contrib-python
Windows下搭建环境步骤下载并安装Python3配置python3环境变量 设置两个环境变量 D:\Python39\Scripts D:\Python39 通过pip命令安装nump、matplotlib、opencv库 python -m pip --version 查看pip的版本号 python -m pip install --upgr...