import cv2
print('OpenCv Version:',cv2.__version__)
# 卸载原有opencv-python,直接安装 opencv-contrib-python
pip uninstall opencv-python
pip install opencv-contrib-python
# 卸载原有opencv-python,建议安装 opencv-contrib-python==3.3.0.10
pip uninstall opencv-python
pip install opencv-contrib-python==3.3.0.10