0

Thanks to read my question. I got homework to print figures and try to use opencv module. I search internet and download opencv by using cmd.(pip install opencv-python) But in pycharm, I can't use opencv module. Error massage tells me

ModuleNotFoundError: No module named 'cv2'

I don't know about programming well, It's hard to me guess reason. Some theory is my code file is in D drive, not C drive which pycharm or python is install.

Jan Černý
  • 1,268
  • 2
  • 17
  • 31

1 Answers1

0

If you have python version 3 and above:

 pip3 install opencv-python

If you have python version 2 and above:

 pip install opencv-python

If you have used these commands and installed the package successfully, there is a good chance that your pycharm is not using the python version that you have installed this package on.

If you just want to be assured that you have installed the package correctly use

pip list

and check if the opencv-python is in the list. If you are seeing this package in the list you should check the version of your pycharm python interpreter.

Checkout this link for more information: https://www.jetbrains.com/help/pycharm/configuring-python-interpreter.html

dauren slambekov
  • 378
  • 3
  • 15