【问题标题】:PyPy ephem couldn't install on linuxPyPy ephem 无法在 linux 上安装
【发布时间】:2021-11-17 19:36:23
【问题描述】:

我想在 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)]

【问题讨论】:

    标签: python c++ c pypy pyephem


    【解决方案1】:

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

    【讨论】:

      【解决方案2】:

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

      【讨论】:

      • 感谢您的回复。我现在知道是什么问题了。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-04-06
      • 1970-01-01
      • 1970-01-01
      • 2017-07-09
      • 1970-01-01
      • 2011-02-26
      • 2012-08-18
      相关资源
      最近更新 更多