PyCharm does not recognize cv2 as a module PyCharm does not recognize cv2 as a module windows windows

PyCharm does not recognize cv2 as a module


here are proper instructions if you have not built opencv from source so that everyone can follow it

  • Click File menu > Settings

enter image description here

  • Search " Project Interpreter " in search bar

enter image description here

  • Click that + button to install packages or press Alt+Insertenter image description here

  • now Available packages window will open and then search for " opencv-python " and click install package button.

enter image description here

  • enjoy and do +1


Try File->Invalidate Caches / Restart...

I can't say definitively why this works, but it may have something to do with the cached module definitions that PyCharm uses to provide code hints. In some cases they aren't updated or get corrupted. I just know that it's worked for me.


Worked on Pycharm 4.0 version

Follow these steps:

  1. Go to File>Settings in Pycharm IDE Window

  2. Search Project Interpreter in search bar.

  3. Click on any package from the available options
  4. Package window will open from where you can install any packages.

I have installed opencv-python package to run opencv commands