Here's a link to an answer post that works for me.
(credit to @dxl. Kindly upvote his/her post if it works for you. I did it too)
In short, I just added another interpreter path in my python interpreter settings that points to:
<my full path to venv>/Lib/site-package/cv2
The steps are:
|
|
1. |
Go to: Settings -> Project -> Python interpreter |
2. |
Click on the "gear symbol" and select "Show All...". This will navigate you to a "Python Interpreters" window. |
3. |
While your intended interpreter is highlighted, click on the "path symbol" which will navigate you to an "Interpreter Paths" window. |
4. |
Click "+" symbol to add path in the interpreter paths window. |
5. |
Add a new interpreter path as shown above. |
6. |
In my case, I needed to restart my PyCharm IDE for the autocompletion to finally work. |
As opposed to his/her configurations, my configurations are:
|
- PyCharm Community Edition 2022.1.1 on Windows 10 |
- Python 3.9.10 running in a Virtual Environment (Virtualenv) |
- opencv-contrib-python 4.6.0.66 installed in the virtual environment via pip command |