BUG: Issue building from source on MacOS Python 3.11

### Describe the bug

I have followed the steps mentioned at https://scikit-learn.org/stable/developers/advanced_installation.html#editable-mode. but it did not work and giving me the following error.

I want to contribute to the community but I am not able to get my development environment ready. Any help/pointer is highly appreciated.

### Steps/Code to Reproduce

`pip install -v --no-use-pep517 --no-build-isolation -e .`


### Expected Results

pip install should succeed without error

### Actual Results
```
Using pip 24.0 from /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/pip (python 3.11)
Obtaining file:///Users/tuhinsharma/Documents/Git/scikit-learn
  Running command python setup.py egg_info
  /Users/tuhinsharma/Documents/Git/scikit-learn/setup.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pkg_resources import parse_version
  Partial import of sklearn during the build process.
  error: Multiple top-level packages discovered in a flat-layout: ['sklearn', 'build_tools'].

  To avoid accidental inclusion of unwanted files or directories,
  setuptools will not proceed with this build.

  If you are trying to create a single distribution with multiple packages
  on purpose, you should not rely on automatic discovery.
  Instead, consider the following options:

  1. set up custom discovery (`find` directive with `include` or `exclude`)
  2. use a `src-layout`
  3. explicitly set `py_modules` or `packages` with a list of names

  To find more information, look for "package discovery" on setuptools docs.
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/tuhinsharma/.virtualenvs/scikit-learn/bin/python -c '
  exec(compile('"'"''"'"''"'"'
  # This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
  #
  # - It imports setuptools before invoking setup.py, to enable projects that directly
  #   import from `distutils.core` to work with newer packaging standards.
  # - It provides a clear error message when setuptools is not installed.
  # - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
  #   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
  #     manifest_maker: standard file '"'"'-c'"'"' not found".
  # - It generates a shim setup.py, for handling setup.cfg-only projects.
  import os, sys, tokenize
  
  try:
      import setuptools
  except ImportError as error:
      print(
          "ERROR: Can not execute `setup.py` since setuptools is not available in "
          "the build environment.",
          file=sys.stderr,
      )
      sys.exit(1)
  
  __file__ = %r
  sys.argv[0] = __file__
  
  if os.path.exists(__file__):
      filename = __file__
      with tokenize.open(__file__) as f:
          setup_py_code = f.read()
  else:
      filename = "<auto-generated setuptools caller>"
      setup_py_code = "from setuptools import setup; setup()"
  
  exec(compile(setup_py_code, filename, "exec"))
  '"'"''"'"''"'"' % ('"'"'/Users/tuhinsharma/Documents/Git/scikit-learn/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' egg_info --egg-base /private/var/folders/24/q83vy1q54_181scf16svmls40000gn/T/pip-pip-egg-info-a3645qry
  cwd: /Users/tuhinsharma/Documents/Git/scikit-learn/
  Preparing metadata (setup.py) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
```

### Versions

```shell
scikit - main branch (c1eee276fa501965e7b4e23e6349031092e33131)
Python - 3.11.8
MacOS Intel Sonoma 14.4.1 x86_64
```

COMMENT:
@betatim Appreciate your quick response. I followed the instructions and now I get the following Cython compilation error. Apologies for pasting such a long stacktrace. 

```
pip install --editable . \
    --verbose --no-build-isolation \
    --config-settings editable-verbose=true
Using pip 24.0 from /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/pip (python 3.11)
Obtaining file:///Users/tuhinsharma/Documents/Git/scikit-learn
  Running command Checking if build backend supports build_editable
  Checking if build backend supports build_editable ... done
  Running command Preparing editable metadata (pyproject.toml)
  <string>:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  Partial import of sklearn during the build process.
  <string>:261: DeprecationWarning:

    `numpy.distutils` is deprecated since NumPy 1.23.0, as a result
    of the deprecation of `distutils` itself. It will be removed for
    Python >= 3.12. For older Python versions it will remain present.
    It is recommended to use `setuptools < 60.0` for those Python versions.
    For more details, see:
      https://numpy.org/devdocs/reference/distutils_status_migration.html


  INFO: blas_opt_info:
  INFO: blas_armpl_info:
  INFO: customize UnixCCompiler
  INFO:   libraries armpl_lp64_mp not found in ['/Users/tuhinsharma/.virtualenvs/scikit-learn/lib', '/usr/local/lib', '/usr/lib']
  INFO:   NOT AVAILABLE
  INFO:
  INFO: blas_mkl_info:
  INFO:   libraries mkl_rt not found in ['/Users/tuhinsharma/.virtualenvs/scikit-learn/lib', '/usr/local/lib', '/usr/lib']
  INFO:   NOT AVAILABLE
  INFO:
  INFO: blas_ssl2_info:
  INFO:   libraries fjlapackexsve not found in ['/Users/tuhinsharma/.virtualenvs/scikit-learn/lib', '/usr/local/lib', '/usr/lib']
  INFO:   NOT AVAILABLE
  INFO:
  INFO: blis_info:
  INFO:   libraries blis not found in ['/Users/tuhinsharma/.virtualenvs/scikit-learn/lib', '/usr/local/lib', '/usr/lib']
  INFO:   NOT AVAILABLE
  INFO:
  INFO: openblas_info:
  INFO:   libraries openblas not found in ['/Users/tuhinsharma/.virtualenvs/scikit-learn/lib', '/usr/local/lib', '/usr/lib']
  INFO:   NOT AVAILABLE
  INFO:
  INFO: accelerate_info:
  INFO:   libraries accelerate not found in ['/Users/tuhinsharma/.virtualenvs/scikit-learn/lib', '/usr/local/lib', '/usr/lib']
  INFO: Library accelerate was not found. Ignoring
  INFO:   libraries veclib not found in ['/Users/tuhinsharma/.virtualenvs/scikit-learn/lib', '/usr/local/lib', '/usr/lib']
  INFO: Library veclib was not found. Ignoring
  INFO:   FOUND:
  INFO:     extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
  INFO:     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
  INFO:     define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None), ('ACCELERATE_NEW_LAPACK', None)]
  INFO:
  INFO:   FOUND:
  INFO:     extra_compile_args = ['-msse3', '-I/System/Library/Frameworks/vecLib.framework/Headers']
  INFO:     extra_link_args = ['-Wl,-framework', '-Wl,Accelerate']
  INFO:     define_macros = [('NO_ATLAS_INFO', 3), ('HAVE_CBLAS', None), ('ACCELERATE_NEW_LAPACK', None)]
  INFO:
  /Users/tuhinsharma/Documents/Git/scikit-learn/sklearn/_build_utils/__init__.py:75: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
    if LooseVersion(Cython.__version__) < CYTHON_MIN_VERSION:
  /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /Users/tuhinsharma/Documents/Git/scikit-learn/sklearn/ensemble/_gradient_boosting.pyx
    tree = Parsing.p_module(s, pxd, full_module_name)
  warning: sklearn/tree/_tree.pxd:61:68: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_tree.pxd:62:59: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_tree.pxd:63:63: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_splitter.pxd:89:72: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_splitter.pxd:94:68: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_criterion.pxd:58:45: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_criterion.pxd:59:40: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_criterion.pxd:60:48: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_criterion.pxd:61:57: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_utils.pxd:48:75: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_utils.pxd:86:61: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_utils.pxd:118:56: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_utils.pxd:136:40: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_utils.pxd:138:71: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_utils.pxd:159:71: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/tree/_utils.pxd:160:40: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

  # See _utils.pyx for details.

  import numpy as np
  cimport numpy as np
  from _tree cimport Node
  ^
  ------------------------------------------------------------

  sklearn/tree/_utils.pxd:13:0: '_tree.pxd' not found

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

  # See _utils.pyx for details.

  import numpy as np
  cimport numpy as np
  from _tree cimport Node
  ^
  ------------------------------------------------------------

  sklearn/tree/_utils.pxd:13:0: '_tree/Node.pxd' not found
  warning: sklearn/neighbors/quad_tree.pxd:75:59: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/neighbors/quad_tree.pxd:94:51: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/neighbors/quad_tree.pxd:97:59: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/neighbors/quad_tree.pxd:98:63: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.
  warning: sklearn/neighbors/quad_tree.pxd:99:80: The keyword 'nogil' should appear at the end of the function signature line. Placing it before 'except' or 'noexcept' will be disallowed in a future version of Cython.

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      (SIZE_t*)
      (unsigned char*)
      (WeightedPQueueRecord*)
      (DOUBLE_t*)
      (DOUBLE_t**)
      (Node*)
       ^
  ------------------------------------------------------------

  sklearn/tree/_utils.pxd:42:5: 'Node' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      (WeightedPQueueRecord*)
      (DOUBLE_t*)
      (DOUBLE_t**)
      (Node*)
      (Cell*)
      (Node**)
       ^
  ------------------------------------------------------------

  sklearn/tree/_utils.pxd:44:5: 'Node' is not a type identifier

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      (WeightedPQueueRecord*)
      (DOUBLE_t*)
      (DOUBLE_t**)
      (Node*)
      (Cell*)
      (Node**)
      ^
  ------------------------------------------------------------

  sklearn/tree/_utils.pxd:44:4: Type specified multiple times

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

      cdef Tree tree
      cdef Node** nodes = NULL
      cdef double** values = NULL
      safe_realloc(&nodes, n_stages * n_outputs)
      safe_realloc(&values, n_stages * n_outputs)
                  ^
  ------------------------------------------------------------

  sklearn/ensemble/_gradient_boosting.pyx:134:16: ambiguous overloaded method

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      # feature_to_sample as a data structure records the last seen sample
      # for each feature; functionally, it is an efficient way to identify
      # which features are nonzero in the present sample.
      cdef SIZE_t* feature_to_sample = NULL

      safe_realloc(&X_sample, n_features)
                  ^
  ------------------------------------------------------------

  sklearn/ensemble/_gradient_boosting.pyx:150:16: ambiguous overloaded method

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      # for each feature; functionally, it is an efficient way to identify
      # which features are nonzero in the present sample.
      cdef SIZE_t* feature_to_sample = NULL

      safe_realloc(&X_sample, n_features)
      safe_realloc(&feature_to_sample, n_features)
                  ^
  ------------------------------------------------------------

  sklearn/ensemble/_gradient_boosting.pyx:151:16: ambiguous overloaded method

  Error compiling Cython file:
  ------------------------------------------------------------
  ...

      cdef Tree tree
      cdef Node** nodes = NULL
      cdef double** values = NULL
      safe_realloc(&nodes, n_stages * n_outputs)
      safe_realloc(&values, n_stages * n_outputs)
      ^
  ------------------------------------------------------------

  sklearn/ensemble/_gradient_boosting.pyx:134:4: Invalid use of fused types, type cannot be specialized

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      # feature_to_sample as a data structure records the last seen sample
      # for each feature; functionally, it is an efficient way to identify
      # which features are nonzero in the present sample.
      cdef SIZE_t* feature_to_sample = NULL

      safe_realloc(&X_sample, n_features)
      ^
  ------------------------------------------------------------

  sklearn/ensemble/_gradient_boosting.pyx:150:4: Invalid use of fused types, type cannot be specialized

  Error compiling Cython file:
  ------------------------------------------------------------
  ...
      # for each feature; functionally, it is an efficient way to identify
      # which features are nonzero in the present sample.
      cdef SIZE_t* feature_to_sample = NULL

      safe_realloc(&X_sample, n_features)
      safe_realloc(&feature_to_sample, n_features)
      ^
  ------------------------------------------------------------

  sklearn/ensemble/_gradient_boosting.pyx:151:4: Invalid use of fused types, type cannot be specialized
  Compiling sklearn/cluster/_dbscan_inner.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/libcpp/vector.pxd.
  Compiling sklearn/cluster/_hierarchical.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/libcpp/utility.pxd.
  Compiling sklearn/cluster/_k_means_elkan.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd.
  Compiling sklearn/cluster/_k_means.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd.
  Compiling sklearn/datasets/_svmlight_format.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/cpython/bool.pxd.
  Compiling sklearn/decomposition/_online_lda.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd.
  Compiling sklearn/decomposition/cdnmf_fast.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/libc/math.pxd.
  Compiling sklearn/ensemble/_gradient_boosting.pyx because it changed.
  Compiling sklearn/feature_extraction/_hashing.pyx because it changed.
  Compiling sklearn/manifold/_utils.pyx because it changed.
  Compiling sklearn/manifold/_barnes_hut_tsne.pyx because it changed.
  Compiling sklearn/metrics/pairwise_fast.pyx because it changed.
  Compiling sklearn/metrics/cluster/expected_mutual_info_fast.pyx because it changed.
  Compiling sklearn/neighbors/ball_tree.pyx because it changed.
  Compiling sklearn/neighbors/kd_tree.pyx because it changed.
  Compiling sklearn/neighbors/dist_metrics.pyx because it changed.
  Compiling sklearn/neighbors/typedefs.pyx because it changed.
  Compiling sklearn/neighbors/quad_tree.pyx because it changed.
  Compiling sklearn/tree/_tree.pyx because it changed.
  Compiling sklearn/tree/_splitter.pyx because it changed.
  Compiling sklearn/tree/_criterion.pyx because it changed.
  Compiling sklearn/tree/_utils.pyx because it changed.
  Compiling sklearn/svm/libsvm.pyx because it changed.
  Compiling sklearn/svm/liblinear.pyx because it changed.
  Compiling sklearn/svm/libsvm_sparse.pyx because it changed.
  Compiling sklearn/_isotonic.pyx because it depends on /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Includes/cpython/type.pxd.
  Compiling sklearn/linear_model/cd_fast.pyx because it changed.
  Compiling sklearn/linear_model/sgd_fast.pyx because it changed.
  Compiling sklearn/linear_model/sag_fast.pyx because it changed.
  Compiling sklearn/utils/sparsefuncs_fast.pyx because it changed.
  Compiling sklearn/utils/arrayfuncs.pyx because it changed.
  Compiling sklearn/utils/murmurhash.pyx because it changed.
  Compiling sklearn/utils/lgamma.pyx because it changed.
  Compiling sklearn/utils/graph_shortest_path.pyx because it changed.
  Compiling sklearn/utils/fast_dict.pyx because it changed.
  Compiling sklearn/utils/seq_dataset.pyx because it changed.
  Compiling sklearn/utils/weight_vector.pyx because it changed.
  Compiling sklearn/utils/_random.pyx because it changed.
  Compiling sklearn/utils/_logistic_sigmoid.pyx because it changed.
  [ 1/39] Cythonizing sklearn/ensemble/_gradient_boosting.pyx
  Traceback (most recent call last):
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 181, in prepare_metadata_for_build_editable
      return hook(metadata_directory, config_settings)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/setuptools/build_meta.py", line 453, in prepare_metadata_for_build_editable
      return self.prepare_metadata_for_build_wheel(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/setuptools/build_meta.py", line 366, in prepare_metadata_for_build_wheel
      self.run_setup()
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/setuptools/build_meta.py", line 487, in run_setup
      super().run_setup(setup_script=setup_script)
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 269, in <module>
    File "<string>", line 265, in setup_package
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/numpy/distutils/core.py", line 136, in setup
      config = configuration()
               ^^^^^^^^^^^^^^^
    File "<string>", line 135, in configuration
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 1050, in add_subpackage
      config_list = self.get_subpackage(subpackage_name, subpackage_path,
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 1016, in get_subpackage
      config = self._get_configuration_from_setup_py(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 958, in _get_configuration_from_setup_py
      config = setup_module.configuration(*args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/tuhinsharma/Documents/Git/scikit-learn/sklearn/setup.py", line 82, in configuration
      maybe_cythonize_extensions(top_path, config)
    File "/Users/tuhinsharma/Documents/Git/scikit-learn/sklearn/_build_utils/__init__.py", line 84, in maybe_cythonize_extensions
      config.ext_modules = cythonize(config.ext_modules)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1154, in cythonize
      cythonize_one(*args)
    File "/Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1321, in cythonize_one
      raise CompileError(None, pyx_file)
  Cython.Compiler.Errors.CompileError: sklearn/ensemble/_gradient_boosting.pyx
  error: subprocess-exited-with-error

  × Preparing editable metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /Users/tuhinsharma/.virtualenvs/scikit-learn/bin/python /Users/tuhinsharma/.virtualenvs/scikit-learn/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_editable /var/folders/24/q83vy1q54_181scf16svmls40000gn/T/tmph5b70h_4
  cwd: /Users/tuhinsharma/Documents/Git/scikit-learn
  Preparing editable metadata (pyproject.toml) ... error
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
```

Labels: Bug