如何在RPI2 Buildroot中获取gmpy2模块

问题描述 投票:1回答:1

我无法让gmpy2 Python模块在Raspberry Pi2的Buildroot构建中运行。默认情况下,Buildroot不包含gmpy2模块。

Buildroot也不包括GCC,所以我在另一个RPI2板上使用Raspbian上的源编译了gmpy2模块(具有相同的Python版本 - 3.7.2 - 作为Buildroot板)并将生成的gmpy2.cpython-37m-arm-linux-gnueabihf.so复制到Buildroot板的/ usr / lib / python3.7 / site-packages /并将链接gmpy2.so放在同一目录中。

我希望Python能够看到模块,但我得到:

# python3
Python 3.7.2 (default, Apr 10 2019, 23:36:01)
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import gmpy2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: File not found
>>>

任何帮助深表感谢!

python-3.x raspberry-pi2 gmp buildroot gmpy
1个回答
1
投票

要为gmpy2创建一个实际的Buildroot包,运行utils/scanpypi gmpy2就足够了。确保package/python-gmpy2/Config.in来自package/Config.in,然后您可以从menuconfig以正常方式选择它。

如果一切正常,请send the patch to the Buildroot mailing list上游包含。感谢您的贡献!

© www.soinside.com 2019 - 2024. All rights reserved.