I'm trying to install the opencv-python
library on macOS using pip
pip install opencv-python
I keep encountering this error:
ERROR: Failed to build installable wheels for some pyproject.toml based projects (opencv-python)
pip install --upgrade pip setuptools wheel
I have tried to solve it,
Installed dependencies via Homebrew:
brew install cmake pkg-config libjpeg libpng libtiff openexr eigen tbb ffmpeg
Attempted to manually build OpenCV from source using CMake (installed via Homebrew).
My Setup:
macOS Version: [macOS Big Sur 11.4]
Python Version: [Python 3.10.9]
pip Version: [pip 25.0 from /Users/demo/anaconda3/lib/python3.10/site-packages/pip (python 3.10)]
Question: What am I missing? How can I resolve this issue and successfully install OpenCV in Python on macOS?
The latest opencv-python
binary package, currently version 4.11, supports Mac OS 13.0+.
You are not running that.
Depending on your architecture (ARM or not), you might have luck installing an older version, like:
pip install opencv-python==4.10.0.84
(macOS 11.0+ ARM64)pip install opencv-python==4.9.0.80
(macOS 10.16+ x86-64)