Install the generated wheel file in the dist/ folder with pip install dist/wheelname.whl. Run the command python setup.py bdistwheel -build-typeDebug. there may have to be some adaptation to the. I'm sure Apple will also support OpenCL on their new system, so OpenCV will be able to use the integrated GPU as well. Install the packages scikit-build and numpy via pip. The Raspberry Pi is an ARM processor and many people use OpenCV on their RPIs. GEOS_LIBRARY_PATH = '/opt/homebrew/Cellar/geos/3.10.2/lib/libgeos_c.1.16.0. In order to build opencv-python in an unoptimized debug build, you need to side-step the normal process a bit. I stumbled with the same issue, in my case it was solved by adding the GDAL_LIBRARY_PATH in the settings.py, but also GEOS_LIBRARY_PATH GDAL_LIBRARY_PATH = '/opt/homebrew/Cellar/gdal/3.4.1_1/lib/libgdal.dylib' Try using the new arm version of python! brew install -cask miniforge Note that if you reinstall Python you also have to reinstall all Python packages with C extensions.
macOS since version 10.8 comes with Python 2.7 pre-installed by Apple. If the two don't match you'll have to reinstall one of them. Python on a Mac running macOS is in principle very similar to Python on any other Unix platform, but there are a number of additional features such as the IDE and the Package Manager that are worth pointing out. To check: run file /opt/homebrew/Cellar/gdal/3.3.1_2/lib/libgdal.dylib and file $(which python3), which should show the supported CPU architectures for both. On an M1 system the OS can run both native arm64 and emulated x86_64 binaries.
After the installation is complete, please create a new Python virtual environment by executing conda create -nameGDAL and Python are likely compiled for different CPU architectures. This is why conda, specifically its miniforge distribution is the recommended package manager for a Mac shipped with M1.