CMake Error: CMake was unable to find a build program corresponding to "Ninja"
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Description
Expected behaviour
Successfully install opencv-python using pip:
python3 –m pip install opencv-python
Actual behaviour
Building wheel for opencv-python (PEP 517) ... error
CMake Error: CMake was unable to find a build program corresponding to "Ninja"
Steps to reproduce
- example code
cd test_cv
source test_cv/bin/activate
python3 -m pip install opencv-python
- operating system
$ uname -a
Linux raspbari3 6.1.21-v7+ #1642 SMP Mon Apr 3 17:20:52 BST 2023 armv7l GNU/Linux
OS: Raspbian GNU/Linux 11 (bullseye) armv7l
Host: Raspberry Pi Zero 2 W Rev 1.0
-
architecture (e.g. x86)
armv7l -
opencv-python version
opencv-python-4.9.0.80.tar.gz
Issue submission checklist
- This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
- I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
- The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
- I'm using the latest version of
opencv-pythonbut
apt installed OpenCV version 4.5.1 with:
sudo apt install python3-opencv
I am using a Python virtual environment with venv.
- numpy installed correctly
- Python version 3.9.2
- Ninja does not exist in the system
- Can run opencv outside of virtual environment but it is v4.5.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing python3 -m pip install opencv-python in the described Python 3.9.2 virtual environment on armv7l Raspberry Pi OS. Inspect the package build entry points and CMake configuration responsible for selecting Ninja; done means the installation completes successfully on this platform or the supported-platform behavior is explicitly addressed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cmake, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100