I'm not quite sure if this works for you, but it works for me. In my case, it seems to me that I installed OpenCV to work with Python by default, coming from OS X. I remember I tried installing Python 2.7.5 and Python 3 on my Mac, I see them when I select my Python translator for Pycharm . And they all did not allow me to import the cv2 module. So I am moving to Python2.7.2 by default (/System/Library/Frameworks/Python.framework/Versions/2.7/bin/python). Then, in the "File / DefaultSettings / Project Interpreter / Python Interpreter" program, click on the Python interpreter that was added (Python 2.7.2), click on "Paths" and find "/usr/local/bin/python2.7/site-packages "and add it. Press the blue update button, apply and good. Then it works with both import and completion.
Hi,
source share