安装
pip install numpy Matplotlib #由于opencv依赖numpy
pip3 install opencv-python
方法二使用国内镜像
pip install opencv-python -i https://[pypi.douban.com](http://pypi.douban.com)/simple
导入
import cv2
pip install numpy Matplotlib #由于opencv依赖numpy
pip3 install opencv-python
pip install opencv-python -i https://[pypi.douban.com](http://pypi.douban.com)/simple
import cv2