Install CMake (3.16 or higher):
brew install cmake
If it's already installed, uninstall opencv-python:
pip uninstall opencv-python
# or
pipenv uninstall opencv-python
Run the following commands:
curl https://files.pythonhosted.org/packages/40/93/655af887bafece2a655998f53b9bd21ad94b0627d81d44aef35c79f40de6/opencv-python-4.7.0.72.tar.gz > opencv.tar.gz
tar -xzvf opencv.tar.gz
cd opencv-python-4.7.0.72
python3 setup.py install
cd ../..
rm -rf opencv-python-4.7.0.72
rm -rf opencv.tar.gz
If tou get ModuleNotFoundError: No module named 'skbuild'
run:
pip3 install scikit-build==0.16.7