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
JavaScript
x
2
1
Import "cv2" could not be resolved Pylance (reportMissingImports)
2
More of the error in the terminal
JavaScript
1
2
1
ModuleNotFoundError: No module named 'cv2'
2
Advertisement
Answer
I noticed that Visual Studio does not support the latest Python 3.8, so I had to use PyCharm as an IDE.