是否可以使用PyInstaller构建一个使用pypy作为解释器的单二进制或单目录包?
有什么特别的花招吗?
PyInstaller的一些替代方案
如果没有,根本的技术原因是什么?
请注意为什么pyinstaller没有将pypy开箱即出:
发布于 2014-03-07 08:36:48
我尝试过这种方法,但失败了很多次,因为PyPy只能处理CPython使用的几个子集。PyInstaller是一个成熟的CPython应用程序,因此无法进行通信。
PyInstaller的机制对CPython的工作方式很敏感,所以PyPy可以引入一些问题。在尝试在PyInstaller虚拟环境中运行PyPy时,您将得到以下结果:
OSError: Python library not found: Python, .Python, libpython3.5.dylib,
libpython3.5m.dylib
This would mean your Python installation doesn't come with proper library files.
This usually happens by missing development package, or unsuitable build
parameters of Python installation.
* On Debian/Ubuntu, you would need to install Python development packages
* apt-get install python3-dev
* apt-get install python-dev
* If you're building Python by yourself, please rebuild your Python with
`--enable-shared` (or, `--enable-framework` on Darwin)如果您需要提高速度并将您的代码隐藏起来,您可以尝试使用Cython。我经常使用Cython和PyInstaller,我喜欢它们的跨平台特性。
当两者都完成后,您可以使用PyInstaller & CPython打包应用程序。
https://stackoverflow.com/questions/22025366
复制相似问题