ModuleNotFoundError No module named cv2
I am getting this modulenotfounderror: no module named 'cv2'
when I tried to import cv2 module in jupyter notebook.
import cv2
ModuleNotFoundError Traceback (most recent call last)
----> 1 import cv2
ModuleNotFoundError: No module named 'cv2'
How can I import cv2?
This “modulenotfounderror: no module named 'cv2' “error may occur if you didn't install opencv module in your system. So first check this module is available or not.
$ pip list or conda list
If it is not available, then install this module.
$ pip install opencv-python or conda install opencv-python
But before that, don’t forget to check numpy module is available or not. If numpy is not available, then install this first.
$ pip install numpy
Hope this will solve your error, and you can import cv2.