If I am correct, you are using an environment different from where you run.

Step1: In command line/terminal where you see the opencv-python when you run pip list:

run python command. Copy your code, check if it works (you can simply import cv2 alternatively)

If it works, my idea should be correct. Otherwise, there is something bigger.

Step 2: (Assuming step1 works.) In Pycharm, Under Run > Edit Configurations, change python interpreter to whichever interpreter is you are that has opencv.

Step2 better alternative: On Pycharm, open the terminal, pip install opencv-python. After that you should have the opencv.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top