Unable to build scikit learn on Mac-M2, python3.11 and 3.9

### Describe the bug

Getting below error when trying to install snips-nlu
ried installing both venv and conda
Also tried to install with python3.9 but failed with the same 
`Cython.Compiler.Errors.CompileError: sklearn/svm/_liblinear.pyx`
      

### Steps/Code to Reproduce

`conda install -c conda-forge scikit-learn`
`pip3 install snips-nlu`



### Expected Results

No error is thrown

### Actual Results

Error compiling Cython file:
      ------------------------------------------------------------
      ...
      
              # Initial capacity
              cdef int init_capacity
      
              if tree.max_depth <= 10:
                  init_capacity = (2 ** (tree.max_depth + 1)) - 1
                                                              ^
      ------------------------------------------------------------
      
      sklearn/tree/_tree.pyx:162:56: Cannot assign type 'double' to 'int'
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              shape[1] = <np.npy_intp> self.n_outputs
              shape[2] = <np.npy_intp> self.max_n_classes
              cdef np.ndarray arr
              arr = np.PyArray_SimpleNewFromData(3, shape, np.NPY_DOUBLE, self.value)
              Py_INCREF(self)
              arr.base = <PyObject*> self
                 ^
      ------------------------------------------------------------
      
      sklearn/tree/_tree.pyx:1103:11: Assignment to a read-only property
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              arr = PyArray_NewFromDescr(<PyTypeObject *> np.ndarray,
                                         <np.dtype> NODE_DTYPE, 1, shape,
                                         strides, <void*> self.nodes,
                                         np.NPY_DEFAULT, None)
              Py_INCREF(self)
              arr.base = <PyObject*> self
                 ^
      ------------------------------------------------------------
      
      sklearn/tree/_tree.pyx:1124:11: Assignment to a read-only property
      Traceback (most recent call last):
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1325, in cythonize_one_helper
          return cythonize_one(*m)
                 ^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: sklearn/utils/_fast_dict.pyx
      Traceback (most recent call last):
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1325, in cythonize_one_helper
          return cythonize_one(*m)
                 ^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: sklearn/neighbors/_ball_tree.pyx
      Traceback (most recent call last):
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1325, in cythonize_one_helper
          return cythonize_one(*m)
                 ^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: sklearn/tree/_splitter.pyx
      Traceback (most recent call last):
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1325, in cythonize_one_helper
          return cythonize_one(*m)
                 ^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: sklearn/tree/_tree.pyx
      multiprocessing.pool.RemoteTraceback:
      """
      Traceback (most recent call last):
        File "/Users/abhiver/miniconda3/lib/python3.11/multiprocessing/pool.py", line 125, in worker
          result = (True, func(*args, **kwds))
                          ^^^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/multiprocessing/pool.py", line 48, in mapstar
          return list(map(*args))
                 ^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1325, in cythonize_one_helper
          return cythonize_one(*m)
                 ^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: sklearn/svm/_liblinear.pyx
      """
      
      The above exception was the direct cause of the following exception:
      
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/w1/10bd4dgn3031ktj_0l5_c1hw0000gn/T/pip-install-c1rih6yx/scikit-learn_89370ec45e394af58b356e7dd81b681a/setup.py", line 303, in <module>
      [ 5/50] Cythonizing sklearn/cluster/_k_means_elkan.pyx
      [22/50] Cythonizing sklearn/linear_model/_sgd_fast.pyx
      [39/50] Cythonizing sklearn/tree/_utils.pyx
      [12/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/_gradient_boosting.pyx
      [25/50] Cythonizing sklearn/metrics/_pairwise_fast.pyx
      [43/50] Cythonizing sklearn/utils/_openmp_helpers.pyx
      [44/50] Cythonizing sklearn/utils/_random.pyx
      [48/50] Cythonizing sklearn/utils/graph_shortest_path.pyx
      [11/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/_binning.pyx
      [20/50] Cythonizing sklearn/linear_model/_cd_fast.pyx
      [45/50] Cythonizing sklearn/utils/_seq_dataset.pyx
      [49/50] Cythonizing sklearn/utils/murmurhash.pyx
      [10/50] Cythonizing sklearn/ensemble/_gradient_boosting.pyx
      [21/50] Cythonizing sklearn/linear_model/_sag_fast.pyx
      [30/50] Cythonizing sklearn/neighbors/_quad_tree.pyx
      [42/50] Cythonizing sklearn/utils/_logistic_sigmoid.pyx
          setup_package()
        File "/private/var/folders/w1/10bd4dgn3031ktj_0l5_c1hw0000gn/T/pip-install-c1rih6yx/scikit-learn_89370ec45e394af58b356e7dd81b681a/setup.py", line 299, in setup_package
          setup(**metadata)
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/numpy/distutils/core.py", line 135, in setup
      [ 6/50] Cythonizing sklearn/cluster/_k_means_fast.pyx
      [24/50] Cythonizing sklearn/manifold/_utils.pyx
      [28/50] Cythonizing sklearn/neighbors/_dist_metrics.pyx
      [41/50] Cythonizing sklearn/utils/_fast_dict.pyx
      [ 2/50] Cythonizing sklearn/_isotonic.pyx
      [27/50] Cythonizing sklearn/neighbors/_ball_tree.pyx
      [ 7/50] Cythonizing sklearn/datasets/_svmlight_format_fast.pyx
      [16/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/histogram.pyx
      [37/50] Cythonizing sklearn/tree/_splitter.pyx
      [ 1/50] Cythonizing sklearn/__check_build/_check_build.pyx
      [13/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/_loss.pyx
      [18/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/utils.pyx
      [33/50] Cythonizing sklearn/svm/_liblinear.pyx
      [35/50] Cythonizing sklearn/svm/_libsvm_sparse.pyx
      [40/50] Cythonizing sklearn/utils/_cython_blas.pyx
          config = configuration()
                   ^^^^^^^^^^^^^^^
        File "/private/var/folders/w1/10bd4dgn3031ktj_0l5_c1hw0000gn/T/pip-install-c1rih6yx/scikit-learn_89370ec45e394af58b356e7dd81b681a/setup.py", line 182, in configuration
          config.add_subpackage('sklearn')
        File "/Users/abhiver/miniconda3/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/abhiver/miniconda3/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 1016, in get_subpackage
          config = self._get_configuration_from_setup_py(
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 958, in _get_configuration_from_setup_py
          config = setup_module.configuration(*args)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/private/var/folders/w1/10bd4dgn3031ktj_0l5_c1hw0000gn/T/pip-install-c1rih6yx/scikit-learn_89370ec45e394af58b356e7dd81b681a/sklearn/setup.py", line 86, in configuration
          cythonize_extensions(top_path, config)
        File "/private/var/folders/w1/10bd4dgn3031ktj_0l5_c1hw0000gn/T/pip-install-c1rih6yx/scikit-learn_89370ec45e394af58b356e7dd81b681a/sklearn/_build_utils/__init__.py", line 75, in cythonize_extensions
          config.ext_modules = cythonize(
                               ^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1125, in cythonize
          result.get(99999)  # seconds
          ^^^^^^^^^^^^^^^^^
        File "/Users/abhiver/miniconda3/lib/python3.11/multiprocessing/pool.py", line 774, in get
          raise self._value
      Cython.Compiler.Errors.CompileError: sklearn/svm/_liblinear.pyx
      [ 3/50] Cythonizing sklearn/cluster/_dbscan_inner.pyx
      [14/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/_predictor.pyx
      [26/50] Cythonizing sklearn/metrics/cluster/_expected_mutual_info_fast.pyx
      [29/50] Cythonizing sklearn/neighbors/_kd_tree.pyx
      [47/50] Cythonizing sklearn/utils/arrayfuncs.pyx
      [ 9/50] Cythonizing sklearn/decomposition/_online_lda_fast.pyx
      [15/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/common.pyx
      [17/50] Cythonizing sklearn/ensemble/_hist_gradient_boosting/splitting.pyx
      [31/50] Cythonizing sklearn/neighbors/_typedefs.pyx
      [34/50] Cythonizing sklearn/svm/_libsvm.pyx
      [38/50] Cythonizing sklearn/tree/_tree.pyx
      [ 4/50] Cythonizing sklearn/cluster/_hierarchical_fast.pyx
      [23/50] Cythonizing sklearn/manifold/_barnes_hut_tsne.pyx
      [36/50] Cythonizing sklearn/tree/_criterion.pyx
      [50/50] Cythonizing sklearn/utils/sparsefuncs_fast.pyx
      [ 8/50] Cythonizing sklearn/decomposition/_cdnmf_fast.pyx
      [19/50] Cythonizing sklearn/feature_extraction/_hashing_fast.pyx
      [32/50] Cythonizing sklearn/preprocessing/_csr_polynomial_expansion.pyx
      [46/50] Cythonizing sklearn/utils/_weight_vector.pyx
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for scikit-learn
  Running setup.py clean for scikit-learn
Failed to build scikit-learn
ERROR: Could not build wheels for scikit-learn, which is required to install pyproject.toml-based projects

### Versions

```shell
System:
    python: 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:41) [Clang 15.0.7 ]
executable: /Users/abhiver/miniconda3/bin/python3
   machine: macOS-13.3.1-arm64-arm-64bit

Python dependencies:
      sklearn: 1.3.0
          pip: 23.2.1
   setuptools: 68.0.0
        numpy: 1.25.2
        scipy: 1.11.1
       Cython: 3.0.0
       pandas: 2.0.3
   matplotlib: 3.7.2
       joblib: 1.3.2
threadpoolctl: 3.2.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 12
         prefix: libopenblas
       filepath: /Users/abhiver/miniconda3/lib/libopenblas.0.dylib
        version: 0.3.23
threading_layer: openmp
   architecture: VORTEX

       user_api: openmp
   internal_api: openmp
    num_threads: 12
         prefix: libomp
       filepath: /Users/abhiver/miniconda3/lib/libomp.dylib
        version: None
```

COMMENT:
I am unable to reproduce the same error. 

```
$ conda create --name envname python==3.11.4
$ conda activate envname
$ conda install -c conda-forge scikit-learn
$ conda install Cython
$ pip3 install snips-nlu
```

```
System:
    python: 3.11.4 | packaged by conda-forge | (main, Jun 10 2023, 18:08:41) [Clang 15.0.7 ]
executable: /Users/username/anaconda3/envs/envname/bin/python
   machine: macOS-13.5-arm64-arm-64bit

Python dependencies:
      sklearn: 1.3.0
          pip: 23.2.1
   setuptools: 68.0.0
        numpy: 1.25.2
        scipy: 1.11.1
       Cython: 3.0.0
       pandas: None
   matplotlib: None
       joblib: 1.3.2
threadpoolctl: 3.2.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 12
         prefix: libopenblas
       filepath: /Users/username/anaconda3/envs/envname/lib/libopenblas.0.dylib
        version: 0.3.23
threading_layer: openmp
   architecture: VORTEX

       user_api: openmp
   internal_api: openmp
    num_threads: 12
         prefix: libomp
       filepath: /Users/username/anaconda3/envs/envname/lib/libomp.dylib
        version: None
```

<details><summary>The error I get instead</summary>

```
(envname) username~$> pip3 install snips-nlu
Collecting snips-nlu
  Using cached snips_nlu-0.20.2-py2.py3-none-any.whl (135 kB)
Collecting deprecation<3.0,>=2.0 (from snips-nlu)
  Using cached deprecation-2.1.0-py2.py3-none-any.whl (11 kB)
Collecting future<0.18,>=0.16 (from snips-nlu)
  Using cached future-0.17.1.tar.gz (829 kB)
  Preparing metadata (setup.py) ... done
Collecting num2words<0.6,>=0.5.6 (from snips-nlu)
  Using cached num2words-0.5.12-py3-none-any.whl (125 kB)
Requirement already satisfied: numpy<2.0,>=1.15 in ./anaconda3/envs/envname/lib/python3.11/site-packages (from snips-nlu) (1.25.2)
Collecting pyaml<20.0,>=17.0 (from snips-nlu)
  Using cached pyaml-19.12.0-py2.py3-none-any.whl (17 kB)
Requirement already satisfied: requests<3.0,>=2.0 in ./anaconda3/envs/envname/lib/python3.11/site-packages (from snips-nlu) (2.31.0)
Requirement already satisfied: scipy<2.0,>=1.0 in ./anaconda3/envs/envname/lib/python3.11/site-packages (from snips-nlu) (1.11.1)
Collecting sklearn-crfsuite<0.4,>=0.3.6 (from snips-nlu)
  Using cached sklearn_crfsuite-0.3.6-py2.py3-none-any.whl (12 kB)
Collecting snips-nlu-parsers<0.5,>=0.3.1 (from snips-nlu)
  Using cached snips_nlu_parsers-0.4.3.tar.gz (6.9 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/n5/kvrq06hx4gn6mv5jmz_804l00000gn/T/pip-install-k1uke7w8/snips-nlu-parsers_bb5acc3c0b6e490d9c7e850d70cc8405/setup.py", line 8, in <module>
          from setuptools_rust import Binding, RustExtension
      ModuleNotFoundError: No module named 'setuptools_rust'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
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.
```

</details>

Labels: Bug, Needs Triage