Can I embed CPython inside PyPy?

南笙酒味 提交于 2019-12-04 09:21:36

No, you can't embed CPython inside PyPy AFAIK. You can, however, use distributed/parallel execution systems to make PyPy talk to CPython. Both execnet and Pyro mention this precise PyPy <-> CPython use case. Other packages from Python Wiki's Parallel Processing page are probably suitable too.

Also, as delnan mentions, there's a current discussion about PyPy developers' plan on implementing Numpy in PyPy (which doesn't include support for scipy, and scikit.learn so far).

Your best bet for the time-being is Cython rather than PyPy. It has c-level performance, if you add type declarations, and excellent integration with numpy, et al.

People are currently working on getting it to work well with PyPy, but that's a ways off yet.

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