I'm using PyCharm 2021.2 Professional edition and I have installed opencv-python with:
pip install opencv-python
However, the IDE keeps giving me the following warning when I try to use cv2 package:
Cannot find reference 'resize' in '__init__.py'
Here I gave the example of the resize function, but it's happening for every function in cv2 package. Although the code runs with no errors, I can't use the auto complete feature, which is a bit annoying. I found an answer here that might help. The guy says to use:
import cv2.cv2 as cv2
However this is not working for me. Im getting the following error:
ERROR: No matching distribution found for cv2
That's because there is no package named cv2 inside opencv. Does anyone know how to solve this problem? Is it a PyCharm's issue?
UPDATE
Here is the output of the command pip show opencv-python
:
Name: opencv-python
Version: 4.5.3.56
Summary: Wrapper package for OpenCV python bindings.
Home-page: https://github.com/skvark/opencv-python
Author: None
Author-email: None
License: MIT
Location: z:\appdata\python\lib\site-packages
Requires: numpy
Required-by: