PyPy ephem无法在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不兼容,请参阅此问题。

在Ronan Lamy的回答之后,我用Py_TYPE(body)改变了body->OB_TYPE,它在v4.0.1中工作

最新更新