linux X86-64 的 python 3.11 环境下,安装numpy==2.1.3 版本后,再安装 cinrad 会报错,初步判断是高版本numpy兼容性问题,手动切换 numpy==1.26.4 后再安装 cinrad 解决。
from cinrad/_utils.c:1240:
/space/cmadaas/dpl/USR_BCWH_YWNW/miniforge3/envs/fastapi/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]
#warning "Using deprecated NumPy API, disable it with " \
^~~~~~~
In file included from /space/cmadaas/dpl/USR_BCWH_YWNW/miniforge3/envs/fastapi/include/python3.11/Python.h:38:0,
from cinrad/_utils.c:29:
cinrad/_utils.c: In function '__pyx_f_5numpy_PyDataType_SHAPE':
cinrad/_utils.c:18699:39: error: 'PyArray_Descr {aka struct _PyArray_Descr}' has no member named 'subarray'
__Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
^
/space/cmadaas/dpl/USR_BCWH_YWNW/miniforge3/envs/fastapi/include/python3.11/pyport.h:24:38: note: in definition of macro '_Py_CAST'
#define _Py_CAST(type, expr) ((type)(expr))
^~~~
/space/cmadaas/dpl/USR_BCWH_YWNW/miniforge3/envs/fastapi/include/python3.11/object.h:506:35: note: in expansion of macro '_PyObject_CAST'
# define Py_INCREF(op) Py_INCREF(_PyObject_CAST(op))
^~~~~~~~~~~~~~
cinrad/_utils.c:2088:27: note: in expansion of macro 'Py_INCREF'
#define __Pyx_INCREF(r) Py_INCREF(r)
^~~~~~~~~
cinrad/_utils.c:18699:5: note: in expansion of macro '__Pyx_INCREF'
__Pyx_INCREF(((PyObject*)__pyx_v_d->subarray->shape));
^~~~~~~~~~~~
cinrad/_utils.c:18700:36: error: 'PyArray_Descr {aka struct _PyArray_Descr}' has no member named 'subarray'
__pyx_r = ((PyObject*)__pyx_v_d->subarray->shape);
^~
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 cinrad
Running setup.py clean for cinrad
Building wheel for cinrad_data (setup.py) ... done
Created wheel for cinrad_data: filename=cinrad_data-0.1-py3-none-any.whl size=58530768 sha256=d65efdcb1f1d0c13c9e61ac1db19bd120549b5743219b3196dc40857ab7ec211
Stored in directory: /space/cmadaas/dpl/USR_BCWH_YWNW/.cache/pip/wheels/fd/32/78/467f872a653cbd226fa84895e44a97d0a0230210d04065e088
Successfully built cinrad_data
Failed to build cinrad
ERROR: Failed to build installable wheels for some pyproject.toml based projects (cinrad)
linux X86-64 的 python 3.11 环境下,安装numpy==2.1.3 版本后,再安装 cinrad 会报错,初步判断是高版本numpy兼容性问题,手动切换 numpy==1.26.4 后再安装 cinrad 解决。