1

I have run the command

pip3 list

It shows that I have already installed these versions of OpenCV

opencv-contrib-python 4.1.2.30
opencv-python 4.2.0.32

But whenever I import cv2 it shows the error

ModuleNotFoundError: No module named 'cv2'

Om Rajpurkar
  • 33
  • 11

1 Answers1

0

If you had a previous version installed. Uninstall it first and try installing it. See the instructions here: https://pypi.org/project/opencv-python/

SKS
  • 46
  • 5
  • 1
    Can't you see that I have the latest version installed! – Om Rajpurkar Feb 19 '20 at 06:25
  • Hey, I understand that you have the latest version. I asked you if this was fresh installation or your were trying to install in a existing environment. Installing over an older version can create conflict which could be the reason. – SKS Feb 19 '20 at 06:29