I’ve installed python and opencv by using the correct commands in the cmd, but when I type in ‘import cv2’ in a python then I get the error in visual studio code and I can’t find any solution online how to fix this
Import "cv2" could not be resolved Pylance (reportMissingImports)
More of the error in the terminal
ModuleNotFoundError: No module named 'cv2'
Advertisement
Answer
I noticed that Visual Studio does not support the latest Python 3.8, so I had to use PyCharm as an IDE.