close

[Solved] ModuleNotFoundError: No module named ‘cv2’

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error ModuleNotFoundError: No module named ‘cv2’ in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How ModuleNotFoundError: No module named ‘cv2’ Error Occurs?

Today I get the following error ModuleNotFoundError: No module named ‘cv2’ in python.

How To Solve ModuleNotFoundError: No module named ‘cv2’ Error ?

  1. How To Solve ModuleNotFoundError: No module named 'cv2' Error ?

    To Solve ModuleNotFoundError: No module named 'cv2' Error Search the page for opencv and for and download the correct .whl for your system. Then pip install it. By example, on my system, after opening a cmd window I typed the following.

  2. ModuleNotFoundError: No module named 'cv2'

    To Solve ModuleNotFoundError: No module named 'cv2' Error Search the page for opencv and for and download the correct .whl for your system. Then pip install it. By example, on my system, after opening a cmd window I typed the following.

Solution 1

In Windows 10 you can install it as

pip install opencv-python

this will allow you to import cv2 module

Solution 2

Faced with the same issue on Windows 10 I downloaded the open cv binary from the Unofficial Windows Binaries for Python Extension Packages.

Search the page for opencv and for and download the correct .whl for your system. Then pip install it. By example, on my system, after opening a cmd window I typed the following.

pip install opencv_python-3.4.1-cp36-cp36m-win_amd64.whl

I then opened python and the following worked

import cv2
print(cv2.__version__)

More info is available in this Mark Jay video.

😀

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read