Skip to content

Error while installing with Pip #180

Open
@dhondta

Description

@dhondta
$ pip -q install --user --no-warn-script-location --break-system-packages --upgrade scikit-learn-extra
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [60 lines of output]
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      import sys
      from time import time
      
      from libc.math cimport exp, log, sqrt, pow, fabs
      cimport numpy as np
      from numpy.math cimport INFINITY
      ^
      ------------------------------------------------------------
      
      sklearn_extra/robust/_robust_weighted_estimator_helper.pyx:18:0: 'numpy/math.pxd' not found
      
      Error compiling Cython file:
      ------------------------------------------------------------
      ...
      import sys
      from time import time
      
      from libc.math cimport exp, log, sqrt, pow, fabs
      cimport numpy as np
      from numpy.math cimport INFINITY
      ^
      ------------------------------------------------------------
      
      sklearn_extra/robust/_robust_weighted_estimator_helper.pyx:18:0: 'numpy/math/INFINITY.pxd' not found
      performance hint: sklearn_extra/robust/_robust_weighted_estimator_helper.pyx:24:0: Exception check on '_euclidean_dense_dense' will always require the GIL to be acquired. Declare '_euclidean_dense_dense' as 'noexcept' if you control the definition and you're sure you don't want the function to raise exceptions.
      Compiling sklearn_extra/utils/_cyfht.pyx because it changed.
      Compiling sklearn_extra/cluster/_k_medoids_helper.pyx because it changed.
      Compiling sklearn_extra/robust/_robust_weighted_estimator_helper.pyx because it changed.
      Compiling sklearn_extra/cluster/_commonnn_inner.pyx because it changed.
      [1/4] Cythonizing sklearn_extra/cluster/_commonnn_inner.pyx
      [2/4] Cythonizing sklearn_extra/cluster/_k_medoids_helper.pyx
      [3/4] Cythonizing sklearn_extra/robust/_robust_weighted_estimator_helper.pyx
      Traceback (most recent call last):
        File "/home/user/.local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
          main()
        File "/home/user/.local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
          json_out["return_val"] = hook(**hook_input["kwargs"])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/user/.local/lib/python3.12/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1oc1tedk/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1oc1tedk/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-1oc1tedk/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-1oc1tedk/overlay/local/lib/python3.12/dist-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 58, in <module>
        File "/tmp/pip-build-env-1oc1tedk/overlay/local/lib/python3.12/dist-packages/Cython/Build/Dependencies.py", line 1145, in cythonize
          cythonize_one(*args)
        File "/tmp/pip-build-env-1oc1tedk/overlay/local/lib/python3.12/dist-packages/Cython/Build/Dependencies.py", line 1289, in cythonize_one
          raise CompileError(None, pyx_file)
      Cython.Compiler.Errors.CompileError: sklearn_extra/robust/_robust_weighted_estimator_helper.pyx
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions