ModuleNotFoundError: No module named 'cv2'

+1 vote

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

Apr 9 in Python by akhtar
• 10,580 points
2,028 views

1 answer to this question.

0 votes

Hi@akhtar,

This 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, try 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.

answered Apr 9 by MD
• 23,050 points
i have both opencv-python and numpy  in my pip3 list bust still the error exist please help me thanks in advance:)

Uninstall opencv-python and numpy first and upgrade your pip using the below command.

$ pip install --upgrade pip

After this, reinstall your software.

Related Questions In Python

+1 vote
2 answers

Not able to install speech_recognition in python: ModuleNotFoundError: No module named 'speech_recognition'

Hey. You have to use SpeechRecognition as module ...READ MORE

answered Nov 28, 2018 in Python by Omkar
• 69,060 points
8,022 views
+2 votes
1 answer

ModuleNotFoundError: No module named 'Crypto'

The module you’ve installed is different. To install ...READ MORE

answered Aug 20, 2019 in Python by Raman
13,999 views
0 votes
2 answers

ModuleNotFoundError: No module named 'pythoncom' in pyttsx3

even i faced the same problem ...just ...READ MORE

answered 3 hours ago in Python by anonymous
1,314 views
0 votes
1 answer

ModuleNotFoundError: No module named 'Foundation'

Hi@akhtar, By default Foundation module comes with Anaconda ...READ MORE

answered Apr 24 in Python by MD
• 23,050 points
101 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 947 views
0 votes
0 answers
+4 votes
6 answers
0 votes
1 answer

ModuleNotFoundError: No module named 'pyttsx3

Hi@akhtar, To avoid this error you have to ...READ MORE

answered Apr 24 in Python by MD
• 23,050 points
289 views