最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Failed to Build Installable Wheels for OpenCV-Python on macOS - Stack Overflow

programmeradmin2浏览0评论

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?

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?

Share Improve this question edited Feb 8 at 11:59 Lorenzo Castagno asked Feb 7 at 15:35 Lorenzo CastagnoLorenzo Castagno 5841 gold badge12 silver badges30 bronze badges 5
  • 2 Please edit your question and add the minimal reproducible example which is the complete error message you get. – dev_light Commented Feb 8 at 10:26
  • AI isn't yet smart enough for that. you still have to cooperate with other humans. – Christoph Rackwitz Commented 2 days ago
  • To all users: I will ask to AI instead. Faster and nicer experience. Good luck here :) – Lorenzo Castagno Commented 2 days ago
  • Chris my (stupid) question isn’t difficult to answer. Actually I got some hint while I was posting this. I regret that I haven’t done that before. – Lorenzo Castagno Commented 2 days ago
  • Many thanks for your help Christoph. – Lorenzo Castagno Commented 2 days ago
Add a comment  | 

1 Answer 1

Reset to default 1

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)
发布评论

评论列表(0)

  1. 暂无评论