OpenCV auto completion problem in Pycharm - Solved

 After creating the project.

1. Open Project Settings.

2. 


3. 
4. 
5. 


After adding the cv2 folder apply and save.



Below is the post from StackOverflow: link

I've had the same issue with PyCharm when building a custom version of OpenCV on windows. Here is what I did to fix it:

OpenCV made a folder in Python site-packages like so: opencv site-packages

So what you need to do is just add the python-3.9 folder to your interpreter.

  • File
  • Settings...
  • Python interpreter
  • Three dots icon next to your interpreter -> Show all...
  • Select your interpreter and click on the "Show paths for selected interpreter" icon
  • Add the folder inside the cv2 site-packages

Now import the cv2 module normally.


Post a Comment

0 Comments