Does PyPy support gmpy2?

☆樱花仙子☆ 提交于 2020-01-06 23:52:11

问题


It seems from the discussions issue #60 and issue #40 that PyPy couldn't build gmpy before. All I intend to use currently is the probable prime is_prime code which is conveniently in gmpy2. I get the impression that the more calls to gmpy2 means less efficiency for PyPy. Is using gmpy2 possible currently, or do I have to use something like GMPY_CFFI?

The error I get when using pip in PyPy is cannot open include file 'mpir.h'


回答1:


You should use GMPY_CFFI. gmpy and gmpy2 rely on too many internal details of CPython to be ported to PyPy.

Note: I maintain gmpy2.



来源:https://stackoverflow.com/questions/35194811/does-pypy-support-gmpy2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!