Skip to content Skip to sidebar Skip to footer

Python 3 Opencv Set Up Problem: "cannot Find Reference 'videocapture' In __init__.py" On Pycharm Ide

I am trying to install OpenCv and run some code on PyCharm on Mac. I have installed the opencv package as well as numpy but when I run the code this error shows up: 'cannot find r

Solution 1:

Instead of import cv2 use from cv2 import cv2

Solution 2:

Try one of this solutions:

  1. Right-click on source Directory
  2. Mark Directory as -> source root
  3. File --> Invalidate Caches / Restart... -> Invalidate and Restart

OR:

  1. In your IDE, go to settings -> preferences -> django
  2. Ensure your Root directory, your settings.py and your manage.py are in the right place if you are in Django.

After all that, you can also delete the .idea folder in your root directory and restart the IDE.

Post a Comment for "Python 3 Opencv Set Up Problem: "cannot Find Reference 'videocapture' In __init__.py" On Pycharm Ide"