pycharm import cv2 : no module named cv2

After successfully installing OpenCV on win 10, it is found that OpenCV can be successfully imported on PowerShell, and the problem of "no module named cv2" will appear when importing cv2 on PyCharm.

Solution:

Open PyCharm and select file-settings-project-project interpreter, as shown in the following figure. If you don't see the opencv-python package after opening it, select the "+" sign in the upper right corner to search for opencv-python. Finally, remember to click the application in the lower right corner.


Related Posts