ModuleNotFoundError: No module named 'cv2'

Python

Hi Guys,

I am getting this below error when I tried to import cv2 module in jupyter notebook.

import cv2
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-c8ec22b3e787> in <module>
----> 1 import cv2
ModuleNotFoundError: No module named 'cv2'

How can I import cv2?

Thank You


If you want to unleash your potential in this competitive field, please visit the Python course page for more information, where you can find the Python tutorials and Python frequently asked interview questions and answers as well.

1
Answers

Replies

This error comes up when you have not installed the opencv module in the system. Hence, you will need to check if this module is available or not. Use the below command to check the same.



$ pip list or conda list



If the module is not available, then install the same using the below command.


$ pip install opencv-python or conda install opencv-python


Also you need to check if the numpy module is available or not. You need to install numpy if it is not available.


 


$ pip install numpy

 
 

This topic has been locked/unapproved. No replies allowed

Login to participate in this discussion.

Leave a reply

Before proceeding, please check your email for a verification link. If you did not receive the email, click here to request another.
WhatsApp
To Top