Skip to content

CMake Error: CMake was unable to find a build program corresponding to "Ninja" #965

Open
@baqwas

Description

@baqwas

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-python but
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions