tommyod / KDEpy

Kernel Density Estimation in Python

Home Page:https://kdepy.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation fails on M1 mac

pavlin-policar opened this issue · comments

Hi, I'm having some trouble installing KDEpy on my M1 mac. I've included the install log below. I've seen on pip that you don't provide wheels for M1 ARM processors, but apparently, building from source also fails on this architecture. Am I missing something really obvious?

Log
> pip install kdepy
Collecting kdepy
  Using cached KDEpy-1.0.2.tar.gz (136 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.14.2 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from kdepy) (1.22.4)
Requirement already satisfied: scipy>=1.0.1 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from kdepy) (1.9.1)
Requirement already satisfied: matplotlib>=2.2.0 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from kdepy) (3.5.3)
Requirement already satisfied: kiwisolver>=1.0.1 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from matplotlib>=2.2.0->kdepy) (1.4.4)
Requirement already satisfied: packaging>=20.0 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from matplotlib>=2.2.0->kdepy) (21.3)
Requirement already satisfied: pillow>=6.2.0 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from matplotlib>=2.2.0->kdepy) (9.2.0)
Requirement already satisfied: pyparsing>=2.2.1 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from matplotlib>=2.2.0->kdepy) (3.0.9)
Requirement already satisfied: cycler>=0.10 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from matplotlib>=2.2.0->kdepy) (0.11.0)
Requirement already satisfied: python-dateutil>=2.7 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from matplotlib>=2.2.0->kdepy) (2.8.2)
Requirement already satisfied: fonttools>=4.22.0 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from matplotlib>=2.2.0->kdepy) (4.37.1)
Requirement already satisfied: six>=1.5 in /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages (from python-dateutil>=2.7->matplotlib>=2.2.0->kdepy) (1.16.0)
Building wheels for collected packages: kdepy
  Building wheel for kdepy (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [230 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.1-arm64-cpython-310
      creating build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/binning.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/kernel_funcs.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/__init__.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/FFTKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/TreeKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/NaiveKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/BaseKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/bw_selection.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/utils.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      running build_ext
      skipping 'KDEpy/cutils.c' Cython extension (up-to-date)
      building 'cutils' extension
      creating build/temp.macosx-11.1-arm64-cpython-310
      creating build/temp.macosx-11.1-arm64-cpython-310/KDEpy
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/pavlin/miniconda3/envs/ml/include -arch arm64 -fPIC -O2 -isystem /Users/pavlin/miniconda3/envs/ml/include -arch arm64 -I/Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages/numpy/core/include -I/Users/pavlin/miniconda3/envs/ml/include/python3.10 -c KDEpy/cutils.c -o build/temp.macosx-11.1-arm64-cpython-310/KDEpy/cutils.o
      KDEpy/cutils.c:17398:5: error: expression is not assignable
          ++Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17400:5: error: expression is not assignable
          --Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17687:5: error: expression is not assignable
          ++Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17689:5: error: expression is not assignable
          --Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17926:5: error: expression is not assignable
          ++Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17928:5: error: expression is not assignable
          --Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:18644:26: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_array.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18649:32: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_MemviewEnum.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18664:31: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryview.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18677:36: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryviewslice.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:20396:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
              return PyUnicode_FromUnicode(NULL, 0);
                     ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      13 warnings and 10 errors generated.
      error: command '/usr/bin/clang' 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 kdepy
  Running setup.py clean for kdepy
Failed to build kdepy
Installing collected packages: kdepy
  Running setup.py install for kdepy ... error
  error: subprocess-exited-with-error

  × Running setup.py install for kdepy did not run successfully.
  │ exit code: 1
  ╰─> [232 lines of output]
      running install
      /Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.1-arm64-cpython-310
      creating build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/binning.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/kernel_funcs.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/__init__.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/FFTKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/TreeKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/NaiveKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/BaseKDE.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/bw_selection.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      copying KDEpy/utils.py -> build/lib.macosx-11.1-arm64-cpython-310/KDEpy
      running build_ext
      skipping 'KDEpy/cutils.c' Cython extension (up-to-date)
      building 'cutils' extension
      creating build/temp.macosx-11.1-arm64-cpython-310
      creating build/temp.macosx-11.1-arm64-cpython-310/KDEpy
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/pavlin/miniconda3/envs/ml/include -arch arm64 -fPIC -O2 -isystem /Users/pavlin/miniconda3/envs/ml/include -arch arm64 -I/Users/pavlin/miniconda3/envs/ml/lib/python3.10/site-packages/numpy/core/include -I/Users/pavlin/miniconda3/envs/ml/include/python3.10 -c KDEpy/cutils.c -o build/temp.macosx-11.1-arm64-cpython-310/KDEpy/cutils.o
      KDEpy/cutils.c:17398:5: error: expression is not assignable
          ++Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17400:5: error: expression is not assignable
          --Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17687:5: error: expression is not assignable
          ++Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17689:5: error: expression is not assignable
          --Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17926:5: error: expression is not assignable
          ++Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:17928:5: error: expression is not assignable
          --Py_REFCNT(o);
          ^ ~~~~~~~~~~~~
      KDEpy/cutils.c:18644:26: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_array.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18649:32: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_MemviewEnum.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18664:31: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryview.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18677:36: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryviewslice.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:20396:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
              return PyUnicode_FromUnicode(NULL, 0);
                     ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      ^
      /Users/pavlin/miniconda3/envs/ml/include/python3.10/pyport.h:513:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      13 warnings and 10 errors generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

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

× Encountered error while trying to install package.
╰─> kdepy

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
commented

Seems like Gh actions don't support M1. I use cibuildwheel, and they also confirm that Cirrus CI is the first public CI platform that natively supports macOS Apple Silicon (so GH actions don't have M1 support). You're on your own basically. Try to use cibuildwheel like I do here to build a .whl file on your computer perhaps. I'll leave this issue open. When it's easy to build using Gh actions I will create or merge a PR so we can have M1 support, but I don't have the capacity to investigate other solutions to this problem in detail myself.

I see. Hopefully, M1 support is added to GH actions soon. I was able to install the package locally by just cloning the repository and installing from source. I'm not sure why that worked as opposed to installing from sdist, but hey, it works now. I suppose that since I have cython installed in my environment, this may have re-cythonized the pyx files, but, skimming over the setup code, I can't really see how or why.

@pavlin-policar Could you please share the steps you performed to install the package locally?

I've don't have the bash logs anymore, but it was probably something along the lines of

git clone git@github.com:tommyod/KDEpy.git
cd KDEpy
pip install .

Hope that helps!

Thanks! I was able to get it installed.

Hi @tommyod ,
We are facing similar issues on s390x because of cutils.c file. PR 89 fixes the issue by removing cutils.c and allowing cutils.c to get generated from cutils.pyx during build.
The latest tag is from year 2020. It would help if new release tagging is done in this repo to avoid this issue and use a specific tag/release. Thanks

commented

I don't use tags anymore. If you need a specific verison, get it from pypi instead. I'll consider tagging future releases if I remember it. But the package is so stable by now that new releases are infrequent.

PyPi does not have built wheel file for s390x. So building from source code is tried by pip and that fails because of the bug I mentioned above. So a tag after that fix of removal of cutils.c in PR 89 would help us in using "pip install" on s390x. Thank you

@rohan097 , @tommyod , I am running into the same issue. However, when I follow your steps to install KDEpy, it does install KDEpy successfully, but then when I import the package in python it complains about ModuleNotFoundError: No module named 'cutils'

When I check in Conda it seems that conda does not have a version of cutils that it can install for the M1 x64 architecture:

(myenv_x86) Floors-MacBook-Pro-2:KDEpy floorbroekgaarden$ conda install cutils
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.

PackagesNotFoundError: The following packages are not available from current channels:

  - cutils

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/r/osx-64
    - https://repo.anaconda.com/pkgs/r/noarch

To search for alternate channels that may provide the conda package you're
looking for, navigate to

    https://anaconda.org

and use the search bar at the top of the page.

Any thoughts ? Thanks so much!

commented

"cutils" refers to this file: https://github.com/tommyod/KDEpy/blob/master/KDEpy/cutils.pyx

Seems like the Cython .pyx code did not build.

This issue also reports errors with Mac: #88

I don't have a Mac myself, and I won't prioritize attempting to fix these issues. That being said, I am very open to pull requests fixing Mac-related issues. The fix will have to make sure the wheels are built correctly for Mac.

commented

I run into a similar issue with version 1.1.0 after running pip install KDEpy

Collecting KDEpy
  Using cached KDEpy-1.0.2.tar.gz (136 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.14.2 in ./opt/miniconda3/lib/python3.9/site-packages (from KDEpy) (1.23.5)
Requirement already satisfied: scipy>=1.0.1 in ./opt/miniconda3/lib/python3.9/site-packages (from KDEpy) (1.9.3)
Requirement already satisfied: matplotlib>=2.2.0 in ./opt/miniconda3/lib/python3.9/site-packages (from KDEpy) (3.6.2)
Requirement already satisfied: cycler>=0.10 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (4.38.0)
Requirement already satisfied: python-dateutil>=2.7 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (2.8.2)
Requirement already satisfied: packaging>=20.0 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (22.0)
Requirement already satisfied: pillow>=6.2.0 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (9.2.0)
Requirement already satisfied: pyparsing>=2.2.1 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (3.0.9)
Requirement already satisfied: kiwisolver>=1.0.1 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (1.4.4)
Requirement already satisfied: contourpy>=1.0.1 in ./opt/miniconda3/lib/python3.9/site-packages (from matplotlib>=2.2.0->KDEpy) (1.0.6)
Requirement already satisfied: six>=1.5 in ./opt/miniconda3/lib/python3.9/site-packages (from python-dateutil>=2.7->matplotlib>=2.2.0->KDEpy) (1.16.0)
Building wheels for collected packages: KDEpy
  Building wheel for KDEpy (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [211 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-3.9
      creating build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/binning.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/kernel_funcs.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/__init__.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/FFTKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/TreeKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/NaiveKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/BaseKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/bw_selection.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/utils.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      running build_ext
      building 'cutils' extension
      creating build/temp.macosx-11.0-arm64-3.9
      creating build/temp.macosx-11.0-arm64-3.9/KDEpy
      arm64-apple-darwin20.0.0-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ccf/opt/miniconda3/include -arch arm64 -fPIC -O2 -isystem /Users/ccf/opt/miniconda3/include -arch arm64 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/ccf/opt/miniconda3/include -D_FORTIFY_SOURCE=2 -isystem /Users/ccf/opt/miniconda3/include -I/Users/ccf/opt/miniconda3/include/python3.9 -c KDEpy/cutils.c -o build/temp.macosx-11.0-arm64-3.9/KDEpy/cutils.o
      KDEpy/cutils.c:18644:26: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_array.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18649:32: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_MemviewEnum.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18664:31: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryview.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18677:36: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryviewslice.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:20396:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
              return PyUnicode_FromUnicode(NULL, 0);
                     ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      13 warnings and 4 errors generated.
      error: command '/Users/ccf/opt/miniconda3/bin/arm64-apple-darwin20.0.0-clang' 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 KDEpy
  Running setup.py clean for KDEpy
Failed to build KDEpy
Installing collected packages: KDEpy
  Running setup.py install for KDEpy ... error
  error: subprocess-exited-with-error
  
  × Running setup.py install for KDEpy did not run successfully.
  │ exit code: 1
  ╰─> [213 lines of output]
      running install
      /Users/ccf/opt/miniconda3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-11.0-arm64-3.9
      creating build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/binning.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/kernel_funcs.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/__init__.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/FFTKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/TreeKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/NaiveKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/BaseKDE.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/bw_selection.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      copying KDEpy/utils.py -> build/lib.macosx-11.0-arm64-3.9/KDEpy
      running build_ext
      building 'cutils' extension
      creating build/temp.macosx-11.0-arm64-3.9
      creating build/temp.macosx-11.0-arm64-3.9/KDEpy
      arm64-apple-darwin20.0.0-clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /Users/ccf/opt/miniconda3/include -arch arm64 -fPIC -O2 -isystem /Users/ccf/opt/miniconda3/include -arch arm64 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -isystem /Users/ccf/opt/miniconda3/include -D_FORTIFY_SOURCE=2 -isystem /Users/ccf/opt/miniconda3/include -I/Users/ccf/opt/miniconda3/include/python3.9 -c KDEpy/cutils.c -o build/temp.macosx-11.0-arm64-3.9/KDEpy/cutils.o
      KDEpy/cutils.c:18644:26: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_array.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18649:32: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_MemviewEnum.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18664:31: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryview.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:18677:36: error: no member named 'tp_print' in 'struct _typeobject'
        __pyx_type___pyx_memoryviewslice.tp_print = 0;
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:22: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                           ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19320:52: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                          (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                         ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:26: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                               ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:261:7: note: expanded from macro 'PyUnicode_GET_SIZE'
            PyUnicode_WSTR_LENGTH(op) :                    \
            ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: 'PyUnicode_AsUnicode' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:262:14: note: expanded from macro 'PyUnicode_GET_SIZE'
            ((void)PyUnicode_AsUnicode(_PyObject_CAST(op)),\
                   ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:580:1: note: 'PyUnicode_AsUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(Py_UNICODE *) PyUnicode_AsUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:19336:59: warning: '_PyUnicode_get_wstr_length' is deprecated [-Wdeprecated-declarations]
                              (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                                                                ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:264:8: note: expanded from macro 'PyUnicode_GET_SIZE'
             PyUnicode_WSTR_LENGTH(op)))
             ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:451:35: note: expanded from macro 'PyUnicode_WSTR_LENGTH'
      #define PyUnicode_WSTR_LENGTH(op) _PyUnicode_get_wstr_length((PyObject*)op)
                                        ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:445:1: note: '_PyUnicode_get_wstr_length' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3)
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      KDEpy/cutils.c:20396:16: warning: 'PyUnicode_FromUnicode' is deprecated [-Wdeprecated-declarations]
              return PyUnicode_FromUnicode(NULL, 0);
                     ^
      /Users/ccf/opt/miniconda3/include/python3.9/cpython/unicodeobject.h:551:1: note: 'PyUnicode_FromUnicode' has been explicitly marked deprecated here
      Py_DEPRECATED(3.3) PyAPI_FUNC(PyObject*) PyUnicode_FromUnicode(
      ^
      /Users/ccf/opt/miniconda3/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED'
      #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__))
                                                           ^
      13 warnings and 4 errors generated.
      error: command '/Users/ccf/opt/miniconda3/bin/arm64-apple-darwin20.0.0-clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> KDEpy

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

I had the same problem on OSX-arm64 and the whole problem was building the cutils.pyx, I managed to build it after installing cython, since I'm using conda I installed cython using conda install -c conda-forge/osx-arm64 cython, Just make sure to use the arm64 channel, I don't know why but if I didn't specify it automatically uses the OSX-64 channel instead. after that installing KDEpy locally (by cloning this repo) was successful and I also tried PyPI remotely and it did work!

Easiest solution so far:

conda install -c conda-forge/osx-arm64 cython
pip install git+https://github.com/tommyod/KDEpy

git+https://github.com/tommyod/KDEpy can even be added to requirements.txt or environment.yml for pip or conda install respectively.

Tommy,

An update on this issue. As I mentioned some months back, I also ran across this. Doing some testing over the weekend, I can no longer replicate with the current KDEpy version. I'm using an M2 Mac (macOS 13.5.1). Testing included the following Python versions:

  • Default system Python (3.9.6)
  • pyenv versions:
    • 3.8.18
    • 3.9.18
    • 3.10.13
    • 3.11.5

I tested all 5 environments using a pip install from PyPI and building from the current master branch. All your tests passed in every case.

I did notice that all the PyPI installs used the source distribution as there are no arm64 wheels available. cibuildwheel can now cross-compile for the Apple Silicon architecture, so these can be made using the GitHub Actions runners. Having those would be helpful for those Mac users without a compiler installed. I can put together a separate PR to build these if you'd like.

Regards,
Scott

commented

I can put together a separate PR to build these if you'd like.

Yes please. All help is appreciated. I'll merge PRs :)

Closing this as version 1.1.8 provides wheels for Apple Silicon Macs. We can re-open if anyone continues to have issues.