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:
- Right-click on source Directory
- Mark Directory as -> source root
- File --> Invalidate Caches / Restart... -> Invalidate and Restart
OR:
- In your IDE, go to settings -> preferences -> django
- 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"