Firstly, go to the top bar and select PyCharm, then select Preferences.
In the new window, select Project Interpreter, and then click on the “+” sign at the left-bottom corner of the window to add a python package to the venv(virtual environment).
Then search opencv-python, and the first in the list is the package you need. You can now click on the “Install Package” button to install the package.
After the installation, you are now safe to import cv2 on your macOS.
You may also need matplotlib package to plot the images or videos, following is the command to install the package inside the venv.
$ python -m pip install -U matplotlib