carla-recourse / CARLA

CARLA: A Python Library to Benchmark Algorithmic Recourse and Counterfactual Explanation Algorithms
MIT License
278 stars 61 forks source link

Carla installation fails #205

Open AnkurLahiry opened 2 weeks ago

AnkurLahiry commented 2 weeks ago

I am getting the following error while running pip install carla-recourse ×

 python setup.py bdist_wheel did not run successfully.
        │ exit code: 1
        ╰─> [15 lines of output]
            Running from numpy source directory.
            Traceback (most recent call last):
              File "<string>", line 2, in <module>
              File "<pip-setuptools-caller>", line 34, in <module>
              File "/tmp/pip-install-p64yogl5/numpy_723c03bb35334bfc880759d77d6df7d3/setup.py", line 443, in <module>
                setup_package()
              File "/tmp/pip-install-p64yogl5/numpy_723c03bb35334bfc880759d77d6df7d3/setup.py", line 422, in setup_package
                from numpy.distutils.core import setup
              File "/tmp/pip-install-p64yogl5/numpy_723c03bb35334bfc880759d77d6df7d3/numpy/distutils/core.py", line 26, in <module>
                from numpy.distutils.command import config, config_compiler, \
              File "/tmp/pip-install-p64yogl5/numpy_723c03bb35334bfc880759d77d6df7d3/numpy/distutils/command/config.py", line 20, in <module>
                from numpy.distutils.mingw32ccompiler import generate_manifest
              File "/tmp/pip-install-p64yogl5/numpy_723c03bb35334bfc880759d77d6df7d3/numpy/distutils/mingw32ccompiler.py", line 34, in <module>
                from distutils.msvccompiler import get_build_version as get_build_msvc_version
            ModuleNotFoundError: No module named 'distutils.msvccompiler'
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed building wheel for numpy
        Running setup.py clean for numpy
        error: subprocess-exited-with-error

        × python setup.py clean did not run successfully.
        │ exit code: 1
        ╰─> [10 lines of output]
            Running from numpy source directory.

            `setup.py clean` is not supported, use one of the following instead:

              - `git clean -xdf` (cleans all files)
              - `git clean -Xdf` (cleans all versioned files, doesn't touch
                                  files that aren't checked into the git repo)

            Add `--force` to your command to use it anyway if you must (unsupported).

            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
        ERROR: Failed cleaning build dir for numpy
      Failed to build numpy
      ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (numpy)
      [end of output]

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

Python version: Python 3.10.12

How I can solve this?

sci-m-wang commented 1 week ago

same issue

sci-m-wang commented 1 week ago

I downgraded the Python version to 3.7, and the package installed successfully.