pip install opencv-python (如果只用主模块,使用这个命令安装) pip install opencv-contrib-python (如果需要用主模块和contrib模块,使用这个命令安装)