david-cortes / isotree

(Python, R, C/C++) Isolation Forest and variations such as SCiForest and EIF, with some additions (outlier detection + similarity + NA imputation)
https://isotree.readthedocs.io
BSD 2-Clause "Simplified" License
186 stars 38 forks source link

Can't install Isotree anymore #50

Closed seperman closed 1 year ago

seperman commented 1 year ago

Hello, I'm not sure what has changed since you don't have a new release. But I can't pip install isotree anymore. It was working a week ago.

                       from isotree/cpp_interface.cpp:1162:
      /tmp/pip-build-env-wopixisn/overlay/lib/python3.11/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
         17 | #warning "Using deprecated NumPy API, disable it with " \
            |  ^~~~~~~
      isotree/cpp_interface.cpp:3391:21: error: conflicting declaration of ‘void cy_warning(const char*)’ with ‘C++’ linkage
       3391 | __PYX_EXTERN_C void cy_warning(char const *); /*proto*/
            |                     ^~~~~~~~~~
      In file included from ./src/headers_joined.hpp:63,
                       from isotree/cpp_interface.cpp:1174:
      ./src/isotree.hpp:115:21: note: previous declaration with ‘C’ linkage
        115 |     extern "C" void cy_warning(const char *msg);
            |                     ^~~~~~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for isotree
Failed to build isotree
ERROR: Could not build wheels for isotree, which is required to install pyproject.toml-based projects

I tried with python 3.11.1 and 3.11.4 pip version 23.2 and 22.3.1 Ubuntu 22.04.2 LTS

tufanbt commented 1 year ago

having the same issue here, was working yesterday

seperman commented 1 year ago

I found a cached wheel in one of the pip folders and I can install isotree from that cached wheel. But I can't build a new wheel anymore.

david-cortes commented 1 year ago

Thanks for the bug report. This is due to a recent update to cython with major changes that was released yesterday. Should be fixed now:

pip install -U isotree