Install OpenCV
Refresh the packages index and install the OpenCV package by typing:
sudo apt update
sudo apt install python3-opencv
The command above will install all packages necessary to run OpenCV.
Verify the OpenCV installation
To verify the installation we will import the cv2 module and print the OpenCV version:
>>> import cv2
>>> cv2.__version__
Output
3.2.0
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…