fail of installation of Scikit-learn in visual studio code.

### Describe the bug

I currently encountered a problem in that I could not install scikit-learn through pip in the terminal. I am currently using Python3 version 3.11.7 and when i tried to use pip to install the scikit-learn, it showed in the terminal that I am having an error.

```shell
Collecting scikit-learn
  Using cached scikit-learn-1.3.2.tar.gz (7.5 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [78 lines of output]
      Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Windows" and platform_python_implementation != "PyPy"' don't match your environment
      Collecting setuptools
        Using cached setuptools-69.0.2-py3-none-any.whl.metadata (6.3 kB)
      Collecting wheel
        Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
      Collecting Cython<3.0,>=0.29.33
        Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
      Collecting oldest-supported-numpy
        Using cached oldest_supported_numpy-2023.12.21-py3-none-any.whl.metadata (9.8 kB)
      Collecting scipy>=1.5.0
        Using cached scipy-1.11.4.tar.gz (56.3 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [44 lines of output]
            + meson setup /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0 /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd/meson-python-native-file.ini
            The Meson build system
            Version: 1.3.0
            Source dir: /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0
            Build dir: /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd
            Build type: native build
            Project name: SciPy
            Project version: 1.11.4
            C compiler for the host machine: cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
            C linker for the host machine: cc ld64 650.9
            C++ compiler for the host machine: c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
            C++ linker for the host machine: c++ ld64 650.9
            Cython compiler for the host machine: cython (cython 0.29.37)
            Host machine cpu family: aarch64
            Host machine cpu: aarch64
            Program python found: YES (/Library/Frameworks/Python.framework/Versions/3.10/bin/python3)
            Found pkg-config: YES (/opt/homebrew/bin/pkg-config) 0.29.2
            Run-time dependency python found: YES 3.10
            Program cython found: YES (/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-build-env-uowhvtjc/overlay/bin/cython)
            Compiler for C supports arguments -Wno-unused-but-set-variable: NO
            Compiler for C supports arguments -Wno-unused-function: YES
            Compiler for C supports arguments -Wno-conversion: YES
            Compiler for C supports arguments -Wno-misleading-indentation: YES
            Library m found: YES
            Fortran compiler for the host machine: gfortran (gcc 13.2.0 "GNU Fortran (Homebrew GCC 13.2.0) 13.2.0")
            Fortran linker for the host machine: gfortran ld64 650.9
            Compiler for Fortran supports arguments -Wno-conversion: YES
            Compiler for C supports link arguments -Wl,-ld_classic: NO
            Checking if "-Wl,--version-script" : links: NO
            Program pythran found: YES (/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-build-env-uowhvtjc/overlay/bin/pythran)
            Did not find CMake 'cmake'
            Found CMake: NO
            Run-time dependency xsimd found: NO (tried pkgconfig, framework and cmake)
            Run-time dependency threads found: YES
            Library npymath found: YES
            Library npyrandom found: YES
            pybind11-config found: YES (/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-build-env-uowhvtjc/overlay/bin/pybind11-config) 2.11.0
            Run-time dependency pybind11 found: YES 2.11.0
            Run-time dependency openblas found: NO (tried pkgconfig, framework and cmake)
            Run-time dependency openblas found: NO (tried pkgconfig and framework)
      
            ../scipy/meson.build:159:9: ERROR: Dependency "OpenBLAS" not found, tried pkgconfig and framework
      
            A full log can be found at /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd/meson-logs/meson-log.txt
            [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.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies 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. 

### Steps/Code to Reproduce

pip install scikit-learn 

### Expected Results

downloaded successfully 

### Actual Results

ollecting scikit-learn
  Using cached scikit-learn-1.3.2.tar.gz (7.5 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [78 lines of output]
      Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Windows" and platform_python_implementation != "PyPy"' don't match your environment
      Collecting setuptools
        Using cached setuptools-69.0.2-py3-none-any.whl.metadata (6.3 kB)
      Collecting wheel
        Using cached wheel-0.42.0-py3-none-any.whl.metadata (2.2 kB)
      Collecting Cython<3.0,>=0.29.33
        Using cached Cython-0.29.37-py2.py3-none-any.whl.metadata (3.1 kB)
      Collecting oldest-supported-numpy
        Using cached oldest_supported_numpy-2023.12.21-py3-none-any.whl.metadata (9.8 kB)
      Collecting scipy>=1.5.0
        Using cached scipy-1.11.4.tar.gz (56.3 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
        Installing backend dependencies: started
        Installing backend dependencies: finished with status 'done'
        Preparing metadata (pyproject.toml): started
        Preparing metadata (pyproject.toml): finished with status 'error'
        error: subprocess-exited-with-error
      
        × Preparing metadata (pyproject.toml) did not run successfully.
        │ exit code: 1
        ╰─> [44 lines of output]
            + meson setup /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0 /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd/meson-python-native-file.ini
            The Meson build system
            Version: 1.3.0
            Source dir: /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0
            Build dir: /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd
            Build type: native build
            Project name: SciPy
            Project version: 1.11.4
            C compiler for the host machine: cc (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
            C linker for the host machine: cc ld64 650.9
            C++ compiler for the host machine: c++ (clang 12.0.5 "Apple clang version 12.0.5 (clang-1205.0.22.11)")
            C++ linker for the host machine: c++ ld64 650.9
            Cython compiler for the host machine: cython (cython 0.29.37)
            Host machine cpu family: aarch64
            Host machine cpu: aarch64
            Program python found: YES (/Library/Frameworks/Python.framework/Versions/3.10/bin/python3)
            Found pkg-config: YES (/opt/homebrew/bin/pkg-config) 0.29.2
            Run-time dependency python found: YES 3.10
            Program cython found: YES (/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-build-env-uowhvtjc/overlay/bin/cython)
            Compiler for C supports arguments -Wno-unused-but-set-variable: NO
            Compiler for C supports arguments -Wno-unused-function: YES
            Compiler for C supports arguments -Wno-conversion: YES
            Compiler for C supports arguments -Wno-misleading-indentation: YES
            Library m found: YES
            Fortran compiler for the host machine: gfortran (gcc 13.2.0 "GNU Fortran (Homebrew GCC 13.2.0) 13.2.0")
            Fortran linker for the host machine: gfortran ld64 650.9
            Compiler for Fortran supports arguments -Wno-conversion: YES
            Compiler for C supports link arguments -Wl,-ld_classic: NO
            Checking if "-Wl,--version-script" : links: NO
            Program pythran found: YES (/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-build-env-uowhvtjc/overlay/bin/pythran)
            Did not find CMake 'cmake'
            Found CMake: NO
            Run-time dependency xsimd found: NO (tried pkgconfig, framework and cmake)
            Run-time dependency threads found: YES
            Library npymath found: YES
            Library npyrandom found: YES
            pybind11-config found: YES (/private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-build-env-uowhvtjc/overlay/bin/pybind11-config) 2.11.0
            Run-time dependency pybind11 found: YES 2.11.0
            Run-time dependency openblas found: NO (tried pkgconfig, framework and cmake)
            Run-time dependency openblas found: NO (tried pkgconfig and framework)
      
            ../scipy/meson.build:159:9: ERROR: Dependency "OpenBLAS" not found, tried pkgconfig and framework
      
            A full log can be found at /private/var/folders/wt/5p14m2ts6pd2jgqzth3vk42m0000gn/T/pip-install-sd7sxder/scipy_9773a2d43f1e4c24badcda81d2fa80f0/.mesonpy-0fvhzlgd/meson-logs/meson-log.txt
            [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.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies 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.

### Versions

```shell
I still have not successfully installed so I do not know
```

COMMENT:
Ouch my guess was wrong then (I see now some apple info with the clang compilers). With an M1, you should get the ARM64 wheel:

```
scikit_learn-1.3.2-cp311-cp311-macosx_12_0_arm64.whl 
```

Could you try:

```
pip install scikit-learn --no-cache-dir
```

to avoid using the cached archive.

For instance, I'm getting the following output on clean Python 3.11 environment:

```shell
> pip install scikit-learn
Collecting scikit-learn
  Downloading scikit_learn-1.3.2-cp311-cp311-macosx_12_0_arm64.whl.metadata (11 kB)
Collecting numpy<2.0,>=1.17.3 (from scikit-learn)
  Downloading numpy-1.26.2-cp311-cp311-macosx_11_0_arm64.whl.metadata (115 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 115.1/115.1 kB 3.8 MB/s eta 0:00:00
Collecting scipy>=1.5.0 (from scikit-learn)
  Downloading scipy-1.11.4-cp311-cp311-macosx_12_0_arm64.whl.metadata (165 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 165.4/165.4 kB 3.9 MB/s eta 0:00:00
Collecting joblib>=1.1.1 (from scikit-learn)
  Using cached joblib-1.3.2-py3-none-any.whl.metadata (5.4 kB)
Collecting threadpoolctl>=2.0.0 (from scikit-learn)
  Using cached threadpoolctl-3.2.0-py3-none-any.whl.metadata (10.0 kB)
Downloading scikit_learn-1.3.2-cp311-cp311-macosx_12_0_arm64.whl (9.4 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.4/9.4 MB 2.7 MB/s eta 0:00:00
Using cached joblib-1.3.2-py3-none-any.whl (302 kB)
Downloading numpy-1.26.2-cp311-cp311-macosx_11_0_arm64.whl (14.0 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 8.4 MB/s eta 0:00:00
Downloading scipy-1.11.4-cp311-cp311-macosx_12_0_arm64.whl (29.7 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 29.7/29.7 MB 7.1 MB/s eta 0:00:00
Using cached threadpoolctl-3.2.0-py3-none-any.whl (15 kB)
Installing collected packages: threadpoolctl, numpy, joblib, scipy, scikit-learn
Successfully installed joblib-1.3.2 numpy-1.26.2 scikit-learn-1.3.2 scipy-1.11.4 threadpoolctl-3.2.0
```

Labels: Needs Info