Installing from source issue

When following the guidelines for **installing scikit-learn from source** (https://scikit-learn.org/dev/developers/advanced_installation.html#building-from-source), I encountered the a problem at step 5:

```bash
pip install -v --no-use-pep517 --no-build-isolation -e .
```

which leads to the following error:

```bash
Using pip 24.0 from /Users/josephbarbier/opt/anaconda3/envs/sklearn-dev/lib/python3.12/site-packages/pip (python 3.12)
Obtaining file:///Users/josephbarbier/Desktop/scikit-learn
ERROR: Disabling PEP 517 processing is invalid: project specifies a build backend of mesonpy in pyproject.toml
```

I also tried:

```bash
pip install -v -e .
```

and then I get (at the end):

```bash
Successfully built scikit-learn
Installing collected packages: threadpoolctl, joblib, scikit-learn
Successfully installed joblib-1.3.2 scikit-learn-1.5.dev0 threadpoolctl-3.4.0
```

But then I run:

```bash
python -c "import sklearn; sklearn.show_versions()"
```

I get:

```bash
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 982, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 925, in _find_spec
  File "/Users/josephbarbier/opt/anaconda3/envs/sklearn-env/lib/python3.9/site-packages/_scikit_learn_editable_loader.py", line 271, in find_spec
    tree = self.rebuild()
  File "/Users/josephbarbier/opt/anaconda3/envs/sklearn-env/lib/python3.9/site-packages/_scikit_learn_editable_loader.py", line 312, in rebuild
    subprocess.run(self._build_cmd, cwd=self._build_path, env=env, stdout=stdout, check=True)
  File "/Users/josephbarbier/opt/anaconda3/envs/sklearn-env/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/Users/josephbarbier/opt/anaconda3/envs/sklearn-env/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/Users/josephbarbier/opt/anaconda3/envs/sklearn-env/lib/python3.9/subprocess.py", line 1837, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/private/var/folders/m2/jfzxyg4s0xz3jyw5f94r7tcm0000gn/T/pip-build-env-kba2z47e/normal/bin/ninja'
```

### Additional context

- `conda list` includes both `compilers` and `llvm-openmp`
- both `conda` and `pip` guides lead to the same error
- macOS Sonoma 14.4
- `Python 3.9.19` and `pip 24.0`

### Suggest a potential alternative/fix

_No response_

COMMENT:
I think you have fallen victim to us not updating the docs fast enough after changing the build system of scikit-learn.

Could you try the instructions listed under [Building with Meson](https://scikit-learn.org/dev/developers/advanced_installation.html#building-with-meson)? I think the missing bit for you is `pip install meson-python ninja` and then `pip install --editable . --verbose --no-build-isolation --config-settings editable-verbose=true` to build the source code.

Labels: Documentation