Home

Published

- 1 min read

ModuleNotFoundError: No module named `cv2`

img of ModuleNotFoundError: No module named `cv2`

The solution for this is noted below

ModuleNotFoundError: No module named cv2

Solution

   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/

Try other methods by searching on the site. That is if this doesn’t work