ModuleNotFoundError: No module named 'cv2'
snippet in c

ModuleNotFoundError: No module named 'cv2'

user7465

To solve this run the following
# main opencv
pip install opencv-python
# contrib package for the extra features
pip install opencv-contrib-python

The official installation instructions are on the opencv website.
More info can be found here: 
https://www.pyimagesearch.com/opencv-tutorials-resources-guides/

cv2 not found

user9336

python -m pip install opencv-python

ModuleNotFoundError: No module named 'yaml'

user7299

sudo pip3 install pyyaml