Skip to content

Error finding "ninja" when setting up development environment #29739

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dstansby opened this issue Mar 12, 2025 · 0 comments
Open

Error finding "ninja" when setting up development environment #29739

dstansby opened this issue Mar 12, 2025 · 0 comments

Comments

@dstansby
Copy link
Member

Following the instructions in https://matplotlib.org/devdocs/devel/development_setup.html#create-local-environment (but using uv to manage the virtual environment), I end up with the following error:

% uv pip install --verbose --no-build-isolation --editable ".[dev]"
DEBUG uv 0.6.5 (Homebrew 2025-03-06)
DEBUG Searching for default Python interpreter in virtual environments
DEBUG Found `cpython-3.12.8-macos-aarch64-none` at `/Users/dstansby/software/matplotlib/.venv/bin/python3` (active virtual environment)
DEBUG Using Python 3.12.8 environment at: .venv
DEBUG Acquired lock for `.venv`
DEBUG At least one requirement is not satisfied: file:///Users/dstansby/software/matplotlib
DEBUG Using request timeout of 30s
DEBUG Found PEP 621 metadata for /Users/dstansby/software/matplotlib in `pyproject.toml` (matplotlib)
DEBUG No static `pyproject.toml` available for: matplotlib @ file:///Users/dstansby/software/matplotlib (DynamicField("version"))
DEBUG Acquired lock for `/Users/dstansby/.cache/uv/sdists-v8/editable/a93b495625504936`
DEBUG Preparing metadata for: matplotlib @ file:///Users/dstansby/software/matplotlib
DEBUG No workspace root found, using project root
DEBUG Proceeding without build isolation
DEBUG Calling `mesonpy.prepare_metadata_for_build_editable()`
   Building matplotlib @ file:///Users/dstansby/software/matplotlib
DEBUG Building: matplotlib @ file:///Users/dstansby/software/matplotlib
DEBUG No workspace root found, using project root
DEBUG Proceeding without build isolation
DEBUG Calling `mesonpy.build_editable("/Users/dstansby/.cache/uv/builds-v0/.tmp3JxhbI", {}, None)`
DEBUG 
DEBUG meson-python: error: Could not find ninja version 1.8.2 or newer.
DEBUG Released lock at `/Users/dstansby/.cache/uv/sdists-v8/editable/a93b495625504936/.lock`
  × Failed to build `matplotlib @ file:///Users/dstansby/software/matplotlib`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `mesonpy.build_editable` failed (exit status: 1)

      [stdout]

      meson-python: error: Could not find ninja version 1.8.2 or newer.

      hint: This usually indicates a problem with the package or the build
      environment.
DEBUG Released lock at `/Users/dstansby/software/matplotlib/.venv/.lock`

Adding ninja>=1.8.2 to the build requirements file seems to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant