1

I have code that requires: import cv2

but get the error message: Exception has occurred: ModuleNotFoundError No module named 'cv2'

I have seen exactly the same question before, but all the suggestions fail. The question is 6 years old and hence am repeating it.

various failed suggestions:

conda install --channel https://conda.anaconda.org/menpo opencv3

conda install -c menpo opencv

I am using Windows 10 and have python 3.8.1 running.

D.L
  • 1,738
  • 2
  • 12
  • 25

1 Answers1

0

I have removed cv2 from the code which works without error and resolves the issue.

The link here (at time of writing, version 4.1.2.3) describes the opencv-python package: opencv-python link

With the following description of cv2 towards the bottom of the page:

It's easier for users to understand opencv-python than cv2 and it makes it easier to find the package with search engines. cv2 (old interface in old OpenCV versions was named as cv) is the name that OpenCV developers chose when they created the binding generators. This is kept as the import name to be consistent with different kind of tutorials around the internet. Changing the import name or behaviour would be also confusing to experienced users who are accustomed to the import cv2.

D.L
  • 1,738
  • 2
  • 12
  • 25