8000 Compiling Fails due to sklearn/metrics/pairwise.py · Issue #29757 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Compiling Fails due to sklearn/metrics/pairwise.py #29757

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

Closed
conradstevens opened this issue Aug 31, 2024 · 8 comments
Closed

Compiling Fails due to sklearn/metrics/pairwise.py #29757

conradstevens opened this issue Aug 31, 2024 · 8 comments
Labels

Comments

@conradstevens
Copy link
Contributor
conradstevens commented Aug 31, 2024

Describe the bug

This may be a duplicate of 29754.

Having merged from upstream, the imports in sklearn/metrics/pairwise.py do not compile.

I am getting error:
"sklearn/metrics/_dist_metrics.pyx", line 1, in init sklearn.metrics._dist_metrics"

I have tried rebuilding my conda environment and sklearn.

Steps/Code to Reproduce

$ python -m sklearn.kernel_approximation

Expected Results

not an error

Actual Results

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/conradstevens/scikit-learn/sklearn/kernel_approximation.py", line 20, in <module>
    from .metrics.pairwise import KERNEL_PARAMS, PAIRWISE_KERNEL_FUNCTIONS, pairwise_kernels
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/__init__.py", line 6, in <module>
    from . import cluster
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/cluster/__init__.py", line 28, in <module>
    from ._unsupervised import (
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/cluster/_unsupervised.py", line 21, in <module>
    from ..pairwise import _VALID_METRICS, pairwise_distances, pairwise_distances_chunked
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/pairwise.py", line 46, in <module>
    from ._pairwise_distances_reduction import ArgKmin
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/_pairwise_distances_reduction/__init__.py", line 97, in <module>
    from ._dispatcher import (
  File "/Users/conradstevens/scikit-learn/sklearn/metrics/_pairwise_distances_reduction/_dispatcher.py", line 11, in <module>
    from .._dist_metrics import (
  File "sklearn/metrics/_dist_metrics.pyx", line 1, in init sklearn.metrics._dist_metrics
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

Versions

$ python -c "import sklearn; sklearn.show_versions()"

System:
    python: 3.12.5 | packaged by conda-forge | (main, Aug  8 2024, 18:31:54) [Clang 16.0.6 ]
executable: /opt/homebrew/Caskroom/miniconda/base/envs/sklearn-dev-3/bin/python
   machine: macOS-14.4.1-x86_64-i386-64bit

Python dependencies:
      sklearn: 1.6.dev0
          pip: 24.2
   setuptools: 72.2.0
        numpy: 2.1.0
        scipy: 1.14.1
       Cython: 3.0.11
       pandas: None
   matplotlib: None
       joblib: 1.4.2
threadpoolctl: 3.5.0

Built with OpenMP: True

threadpoolctl info:
       user_api: blas
   internal_api: openblas
    num_threads: 10
         prefix: libopenblas
       filepath: /opt/homebrew/Caskroom/miniconda/base/envs/sklearn-dev-3/lib/libopenblasp-r0.3.27.dylib
        version: 0.3.27
threading_layer: openmp
   architecture: Nehalem

       user_api: openmp
   internal_api: openmp
    num_threads: 10
         prefix: libomp
       filepath: /opt/homebrew/Caskroom/miniconda/base/envs/sklearn-dev-3/lib/libomp.dylib
        version: None
@conradstevens conradstevens added Bug Needs Triage Issue requires triage labels Aug 31, 2024
@torinriley

This comment was marked as spam.

@glemaitre
Copy link
Member

This is not related to #29754. The latter issue is related the wheels building and fail for Windows while you are under MacOS.

The error that you witness is related to numpy/numpy#26710. I'm a bit confused why you get it with the development version. Normally, the error is triggered when you have NumPy 2.0+ with an older version of scikit-learn that is not compatible with NumPy 2.0+.

Could you retry to clean and rebuild from source with shown dependencies.

@glemaitre glemaitre removed the Needs Triage Issue requires triage label Aug 31, 2024
@conradstevens
Copy link
Contributor Author
conradstevens commented Aug 31, 2024

Thank you @glemaitre I have rebuild from source and getting the same issue.
I am not entirely sure what you mean by 'with shown dependencies'. Below is what is in my conda environment:

\# packages in environment at /opt/homebrew/Caskroom/miniconda/base/envs/sklearn-dev-5:
\#
\# Name                    Version                   Build  Channel
bzip2                     1.0.8                hfdf4475_7    conda-forge
c-compiler                1.7.0                h282daa2_1    conda-forge
ca-certificates           2024.8.30            h8857fd0_0    conda-forge
cctools                   986                  h40f6528_3    conda-forge
cctools_osx-64            986                  h303a5ab_3    conda-forge
clang                     16.0.6          default_h179603d_13    conda-forge
clang-16                  16.0.6          default_h0c94c6a_13    conda-forge
clang_impl_osx-64         16.0.6              h8787910_19    conda-forge
clang_osx-64              16.0.6              hb91bd55_19    conda-forge
clangxx                   16.0.6          default_h179603d_13    conda-forge
clangxx_impl_osx-64       16.0.6              h6d92fbe_19    conda-forge
clangxx_osx-64            16.0.6              hb91bd55_19    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-fo
8000
rge
compiler-rt               16.0.6               ha38d28d_2    conda-forge
compiler-rt_osx-64        16.0.6               ha38d28d_2    conda-forge
compilers                 1.7.0                h694c41f_1    conda-forge
cxx-compiler              1.7.0                h7728843_1    conda-forge
cython                    3.0.11          py312h5861a67_1    conda-forge
exceptiongroup            1.2.2              pyhd8ed1ab_0    conda-forge
fortran-compiler          1.7.0                h6c2ab21_1    conda-forge
gfortran                  12.3.0               h2c809b3_1    conda-forge
gfortran_impl_osx-64      12.3.0               hc328e78_3    conda-forge
gfortran_osx-64           12.3.0               h18f7dce_1    conda-forge
gmp                       6.3.0                hf036a51_2    conda-forge
icu                       75.1                 h120a0e1_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
isl                       0.26            imath32_h2e86a7b_101    conda-forge
joblib                    1.4.2              pyhd8ed1ab_0    conda-forge
ld64                      711                  ha02d983_3    conda-forge
ld64_osx-64               711                  h04ffbf3_3    conda-forge
libblas                   3.9.0           22_osx64_openblas    conda-forge
libcblas                  3.9.0           22_osx64_openblas    conda-forge
libclang-cpp16            16.0.6          default_h0c94c6a_13    conda-forge
libcxx                    18.1.8               hd876a4e_6    conda-forge
libcxx-devel              16.0.6               h8f8a49f_2    conda-forge
libexpat                  2.6.2                h73e2aa4_0    conda-forge
libffi                    3.4.2                h0d85af4_5    conda-forge
libgfortran               5.0.0           13_2_0_h97931a8_3    conda-forge
libgfortran-devel_osx-64  12.3.0               h0b6f5ec_3    conda-forge
libgfortran5              13.2.0               h2873a65_3    conda-forge
libiconv                  1.17                 hd75f5a5_2    conda-forge
liblapack                 3.9.0           22_osx64_openblas    conda-forge
libllvm16                 16.0.6               hbedff68_3    conda-forge
libopenblas               0.3.27          openmp_h8869122_1    conda-forge
libsqlite                 3.46.0               h1b8f9f3_0    conda-forge
libxml2                   2.12.7               heaf3512_4    conda-forge
libzlib                   1.3.1                h87427d6_1    conda-forge
llvm-openmp               18.1.8               h15ab845_1    conda-forge
llvm-tools                16.0.6               hbedff68_3    conda-forge
meson                     1.5.1              pyhd8ed1ab_1    conda-forge
meson-python              0.16.0             pyh0c530f3_0    conda-forge
mpc                       1.3.1                h9d8efa1_0    conda-forge
mpfr                      4.2.1                hc80595b_2    conda-forge
ncurses                   6.5                  hf036a51_1    conda-forge
ninja                     1.12.1               h3c5361c_0    conda-forge
numpy                     2.1.0           py312h8813227_0    conda-forge
openssl                   3.3.1                hd23fc13_3    conda-forge
packaging                 24.1               pyhd8ed1ab_0    conda-forge
pip                       24.2               pyh8b19718_1    conda-forge
pluggy                    1.5.0              pyhd8ed1ab_0    conda-forge
pyproject-metadata        0.8.0              pyhd8ed1ab_0    conda-forge
pytest                    8.3.2              pyhd8ed1ab_0    conda-forge
python                    3.12.5          h37a9e06_0_cpython    conda-forge
python_abi                3.12                    5_cp312    conda-forge
readline                  8.2                  h9e318b2_1    conda-forge
scikit-learn              1.6.dev0                 pypi_0    pypi
scipy                     1.14.1          py312he82a568_0    conda-forge
setuptools                72.2.0             pyhd8ed1ab_0    conda-forge
sigtool                   0.1.3                h88f4db0_0    conda-forge
tapi                      1100.0.11            h9ce4665_0    conda-forge
threadpoolctl             3.5.0              pyhc1e730c_0    conda-forge
tk                        8.6.13               h1abcd95_1    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h8827d51_1    conda-forge
wheel                     0.44.0             pyhd8ed1ab_0    conda-forge
xz                        5.2.6                h775f41a_0    conda-forge
zlib                      1.3.1                h87427d6_1    conda-forge
zstd                      1.5.6                h915ae27_0    conda-forge

When compiling I get warning:

[139/251] Compiling C object sklearn/metrics/_dist_metrics.cpython-312-darwin.so.p/meson-generated_sklearn_metrics__dist_metrics.pyx.c.o
  sklearn/metrics/_dist_metrics.cpython-312-darwin.so.p/sklearn/metrics/_dist_metrics.pyx.c:29538:29: warning: assigning to '__pyx_t_7sklearn_5utils_9_typedefs_float64_t *' (aka 'double *') from 'const __pyx_t_7sklearn_5utils_9_typedefs_float64_t *' (aka 'const double *') discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
              __pyx_v_x2_data = ((&(*((__pyx_t_7sklearn_5utils_9_typedefs_float64_t const  *) ( /* dim=1 */ ((char *) (((__pyx_t_7sklearn_5utils_9_typedefs_float64_t const  *) ( /* dim=0 */ (__pyx_v_Y_data.data + __pyx_t_18 * __pyx_v_Y_data.strides[0]) )) + __pyx_t_19)) )))) + (__pyx_v_i2 * __pyx_v_n_features));

@lesteve
Copy link
Member
lesteve commented Sep 1, 2024

It's hard to tell what is happening but I am pretty sure that this should go away if you rebuild from scratch. Try something like this before rebuilding:

rm -rf build
git clean -xdf

@glemaitre
Copy link
Member

When compiling I get warning:

Don't worry about the warning, this should not be an issue. We have a several PRs that tries to reduce the number of warnings in the past.

@conradstevens
Copy link
Contributor Author

It's hard to tell what is happening but I am pretty sure that this should go away if you rebuild from scratch. Try something like this before rebuilding:

rm -rf build
git clean -xdf

It seems this fixed it. Thank you all

@lesteve lesteve added Question and removed Bug labels Sep 1, 2024
@lesteve
Copy link
Member
lesteve commented Sep 1, 2024

Great to hear that 🎉. It can happen to be in weird situations like this and the rebuild from scratch is the first thing to try ...

It's a bit hard at the beginning but after a bit of time you will get some intuition whether something is likely due to scikit-learn or to your local setup somehow. In this particular case, we have tests running on each commit on a variety of platforms so it was quite unlikely that it was a scikit-learn issue or we would likely have noticed.

Having said that, it can happen that main is broken, maybe once every 6 months or so, so if you notice something that does not go away after a rebuild from scratch, do open an issue!

In your particular case, I am guessing that what happened is that you built with numpy<2 and then upgraded your environment to numpy>=2. This is a known issue that in this case you will get a not so user-friendly error message unfortunately see https://numpy.org/devdocs/user/troubleshooting-importerror.html#downstream-importerror-attributeerror-or-c-api-abi-incompatibility for more details.

@lesteve lesteve closed this as completed Sep 1, 2024
@hlin-0420
Copy link

I am using windows for installing goldenverba, and encountered the following similar error with preparing the meta data:

Preparing metadata (pyproject.toml) ... error

Steps/Code to Reproduce

pip install goldenverba

Expected

No errors: a successful installation.

Actual Result:

error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [124 lines of output]
      + meson setup C:\Users\HaochengLin\AppData\Local\Temp\pip-install-7c4qw_4k\scikit-learn_715436ce7c184007ab495e4d6782f6ba C:\Users\HaochengLin\AppData\Local\Temp\pip-install-7c4qw_4k\scikit-learn_715436ce7c184007ab495e4d6782f6ba\.mesonpy-1x4b5lnb -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\HaochengLin\AppData\Local\Temp\pip-install-7c4qw_4k\scikit-learn_715436ce7c184007ab495e4d6782f6ba\.mesonpy-1x4b5lnb\meson-python-native-file.ini
      The Meson build system
      Version: 1.7.0
      Source dir: C:\Users\HaochengLin\AppData\Local\Temp\pip-install-7c4qw_4k\scikit-learn_715436ce7c184007ab495e4d6782f6ba
      Build dir: C:\Users\HaochengLin\AppData\Local\Temp\pip-install-7c4qw_4k\scikit-learn_715436ce7c184007ab495e4d6782f6ba\.mesonpy-1x4b5lnb
      Build type: native build
      Project name: scikit-learn
      Project version: 1.5.1
      Activating VS 17.12.4
      C compiler for the host machine: cl (msvc 19.42.34436 "Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34436 for x64")
      C linker for the host machine: link link 14.42.34436.0
      C++ compiler for the host machine: cl (msvc 19.42.34436 "Microsoft (R) C/C++ Optimizing Compiler Version 19.42.34436 for x64")
      C++ linker for the host machine: link link 14.42.34436.0
      Cython compiler for the host machine: cython (cython 3.0.12)
      Host machine cpu family: x86_64
      Host machine cpu: x86_64
      Compiler for C supports arguments -Wno-unused-but-set-variable: NO
      Compiler for C supports arguments -Wno-unused-function: NO
      Compiler for C supports arguments -Wno-conversion: NO
      Compiler for C supports arguments -Wno-misleading-indentation: NO
      Library m found: NO
      Program python found: YES (C:\Users\HaochengLin\Desktop\Verba-Model\venv\Scripts\python.exe)
      Run-time dependency OpenMP for c found: YES 2.0
      Run-time dependency python found: YES 3.13
      Build targets in project: 111

      scikit-learn 1.5.1

        User defined options
          Native files: C:\Users\HaochengLin\AppData\Local\Temp\pip-install-7c4qw_4k\scikit-learn_715436ce7c184007ab495e4d6782f6ba\.mesonpy-1x4b5lnb\meson-python-native-file.ini
          b_ndebug    : if-release
          b_vscrt     : md
          buildtype   : release

      Found ninja.EXE-1.11.1.git.kitware.jobserver-1 at C:\Users\HaochengLin\AppData\Local\Programs\Python\Python313\Scripts\ninja.EXE
      + meson compile
      [1/249] Generating sklearn/write_built_with_meson_file with a custom command
      [2/249] Generating sklearn/utils/_seq_dataset_pxd with a custom command
      [3/249] Generating sklearn/utils/_weight_vector_pxd with a custom command
      [4/249] Copying file sklearn/utils/_cython_blas.pxd
      [5/249] Generating sklearn/metrics/_dist_metrics_pxd with a custom command
      [6/249] Copying file sklearn/utils/_random.pxd
      [7/249] Copying file sklearn/__init__.py
      [8/249] Copying file sklearn/utils/__init__.py
      [9/249] Copying file sklearn/utils/_sorting.pxd
      [10/249] Copying file sklearn/_loss/_loss.pxd
      [11/249] Copying file sklearn/utils/_typedefs.pxd
      [12/249] Copying file sklearn/utils/_openmp_helpers.pxd
      [13/249] Copying file sklearn/utils/_heap.pxd
      [14/249] Copying file sklearn/utils/_vector_sentinel.pxd
      [15/249] Generating sklearn/metrics/_pairwise_distances_reduction/_base_pxd with a custom command
      [16/249] Generating sklearn/metrics/_pairwise_distances_reduction/_datasets_pair_pxd with a custom command
      [17/249] Generating sklearn/metrics/_pairwise_distances_reduction/_middle_term_computer_pxd with a custom command
      [18/249] Copying file sklearn/metrics/__init__.py
      [19/249] Generating sklearn/metrics/_pairwise_distances_reduction/_argkmin_pxd with a custom command
      [20/249] Generating sklearn/_loss/_loss_pyx with a custom command
      [21/249] Generating sklearn/metrics/_pairwise_distances_reduction/_radius_neighbors_pxd with a custom command
      [22/249] Compiling C++ object sklearn/utils/murmurhash.cp313-win_amd64.pyd.p/src_MurmurHash3.cpp.obj
      [23/249] Copying file sklearn/metrics/_pairwise_distances_reduction/_classmode.pxd
      [24/249] Copying file sklearn/metrics/_pairwise_distances_reduction/__init__.py
      [25/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/__check_build/_check_build.pyx
      [26/249] Compiling C object sklearn/__check_build/_check_build.cp313-win_amd64.pyd.p/meson-generated_sklearn___check_build__check_build.pyx.c.obj
      [27/249] Linking target sklearn/__check_build/_check_build.cp313-win_amd64.pyd
         Creating library sklearn\__check_build\_check_build.cp313-win_amd64.lib and object sklearn\__check_build\_check_build.cp313-win_amd64.exp

      [28/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/_isotonic.pyx
      [29/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_heap.pyx
      [30/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_openmp_helpers.pyx
      [31/249] Compiling C object sklearn/utils/_heap.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__heap.pyx.c.obj
      [32/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/murmurhash.pyx
      [33/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/metrics/cluster/_expected_mutual_info_fast.pyx
      [34/249] Compiling C object sklearn/utils/_openmp_helpers.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__openmp_helpers.pyx.c.obj
      [35/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_typedefs.pyx
      [36/249] Linking target sklearn/utils/_heap.cp313-win_amd64.pyd
         Creating library sklearn\utils\_heap.cp313-win_amd64.lib and object sklearn\utils\_heap.cp313-win_amd64.exp

      [37/249] Linking target sklearn/utils/_openmp_helpers.cp313-win_amd64.pyd
         Creating library sklearn\utils\_openmp_helpers.cp313-win_amd64.lib and object sklearn\utils\_openmp_helpers.cp313-win_amd64.exp

      [38/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_fast_dict.pyx
      [39/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_random.pyx
      [40/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/cluster/_hdbscan/_reachability.pyx
      [41/249] Generating sklearn/utils/_seq_dataset_pyx with a custom command
      [42/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_sorting.pyx
      [43/249] Compiling C object sklearn/_isotonic.cp313-win_amd64.pyd.p/meson-generated_sklearn__isotonic.pyx.c.obj
      [44/249] Generating sklearn/utils/_weight_vector_pyx with a custom command
      [45/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_cython_blas.pyx
      [46/249] Compiling C object sklearn/utils/murmurhash.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils_murmurhash.pyx.c.obj
      ..\sklearn\utils\src/MurmurHash3.h(16): warning C4142: 'uint32_t': benign redefinition of type
      C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\include\stdint.h(24): note: see declaration of 'uint32_t'
      [47/249] Compiling C object sklearn/utils/_sorting.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__sorting.pyx.c.obj
      [48/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/sparsefuncs_fast.pyx
      [49/249] Compiling C object sklearn/utils/_typedefs.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__typedefs.pyx.c.obj
      [50/249] Compiling C object sklearn/utils/_random.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__random.pyx.c.obj
      [51/249] Compiling C++ object sklearn/utils/_fast_dict.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__fast_dict.pyx.cpp.obj
      sklearn/utils/_fast_dict.cp313-win_amd64.pyd.p/sklearn/utils/_fast_dict.pyx.cpp(26950): warning C4551: function call missing argument list
      sklearn/utils/_fast_dict.cp313-win_amd64.pyd.p/sklearn/utils/_fast_dict.pyx.cpp(30800): warning C4551: function call missing argument list
      sklearn/utils/_fast_dict.cp313-win_amd64.pyd.p/sklearn/utils/_fast_dict.pyx.cpp(30801): warning C4551: function call missing argument list
      sklearn/utils/_fast_dict.cp313-win_amd64.pyd.p/sklearn/utils/_fast_dict.pyx.cpp(30802): warning C4551: function call missing argument list
      [52/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_vector_sentinel.pyx
      [53/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/_isfinite.pyx
      [54/249] Compiling Cython source C:/Users/HaochengLin/AppData/Local/Temp/pip-install-7c4qw_4k/scikit-learn_715436ce7c184007ab495e4d6782f6ba/sklearn/utils/arrayfuncs.pyx
      [55/249] Compiling Cython source sklearn/utils/_weight_vector.pyx
      [56/249] Compiling Cython source sklearn/utils/_seq_dataset.pyx
      [57/249] Compiling C++ object sklearn/utils/_vector_sentinel.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__vector_sentinel.pyx.cpp.obj
      sklearn/utils/_vector_sentinel.cp313-win_amd64.pyd.p/sklearn/utils/_vector_sentinel.pyx.cpp(15416): warning C4551: function call missing argument list
      [58/249] Linking target sklearn/utils/murmurhash.cp313-win_amd64.pyd
         Creating library sklearn\utils\murmurhash.cp313-win_amd64.lib and object sklearn\utils\murmurhash.cp313-win_amd64.exp

      [59/249] Linking target sklearn/_isotonic.cp313-win_amd64.pyd
         Creating library sklearn\_isotonic.cp313-win_amd64.lib and object sklearn\_isotonic.cp313-win_amd64.exp

      [60/249] Linking target sklearn/utils/_typedefs.cp313-win_amd64.pyd
         Creating library sklearn\utils\_typedefs.cp313-win_amd64.lib and object sklearn\utils\_typedefs.cp313-win_amd64.exp

      [61/249] Generating sklearn/metrics/_dist_metrics_pyx with a custom command
      [62/249] Coninja: error: mkdir(sklearn/metrics/_pairwise_distances_reduction/_datasets_pair.cp313-win_amd64.pyd.p/sklearn/metrics/_pairwise_distances_reduction): No such file or directory
      mpiling C object sklearn/utils/_cython_blas.cp313-win_amd64.pyd.p/meson-generated_sklearn_utils__cython_blas.pyx.c.obj
      [63/249] Generating sklearn/metrics/_pairwise_distances_reduction/_datasets_pair_pyx with a custom command
      ninja: build stopped: .
      Activating VS 17.12.4
      INFO: automatically activated MSVC compiler environment
      INFO: autodetecting backend as ninja
      INFO: calculating backend command to run: C:\Users\HaochengLin\AppData\Local\Programs\Python\Python313\Scripts\ninja.EXE
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Would you like to check to see if this issue could be resolved or reproduced?

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

No branches or pull requests

5 participants
0