PyPy ephem 无法安装 linux

PyPy ephem couldn't install on linux

我想在 PyPy 3.7 上安装 ephem 包,但我做不到。因为我在安装过程中收到了以下消息。我想,我错过了什么。

gcc -pthread -DNDEBUG -O2 -fPIC -Ilibastro -I. -I/root/pypy3.7/include -c extensions/_libastro.c -o build/temp.linux-x86_64-3.7/extensions/_libastro.o -ffloat-store
extensions/_libastro.c: In function ‘Body_repr’:
extensions/_libastro.c:20:17: error: ‘Body’ {aka ‘struct <anonymous>’} has no member named ‘ob_base’; did you mean ‘ob_type’?
 #define OB_TYPE ob_base.ob_type
                 ^~~~~~~
extensions/_libastro.c:1380:18: note: in expansion of macro ‘OB_TYPE’
            body->OB_TYPE->tp_name, name, body);
                  ^~~~~~~
extensions/_libastro.c:20:17: error: ‘Body’ {aka ‘struct <anonymous>’} has no member named ‘ob_base’; did you mean ‘ob_type’?
 #define OB_TYPE ob_base.ob_type
                 ^~~~~~~
extensions/_libastro.c:1385:16: note: in expansion of macro ‘OB_TYPE’
          body->OB_TYPE->tp_name,
                ^~~~~~~
extensions/_libastro.c:20:17: error: ‘Body’ {aka ‘struct <anonymous>’} has no member named ‘ob_base’; did you mean ‘ob_type’?
 #define OB_TYPE ob_base.ob_type
                 ^~~~~~~
extensions/_libastro.c:1389:16: note: in expansion of macro ‘OB_TYPE’
          body->OB_TYPE->tp_name, body);
                ^~~~~~~
error: command 'gcc' failed with exit status 1

PyPy 信息

Python 3.7.10 (77787b8f4c49, May 15 2021, 11:50:33)
[PyPy 7.3.5 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)]

该库当前与 pypy 不兼容,请参阅 this issue

在 Ronan Lamy 回答后,我将 body->OB_TYPE 更改为 Py_TYPE(body),它适用于 v4.0.1