一个好的python到exe编译器?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14165398/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 10:39:26  来源:igfitidea点击:

a good python to exe compiler?

python

提问by user1866880

I am new to python and apart from the language itself, I am exploring various aspects of it. in terms of compilation into .exe (so that it can be deployed without installing python too) I checked py2exe, new releases stopped a few years ago. Then pyInstaller, seems to have stopped at python 2.7.

我是 Python 的新手,除了语言本身,我还在探索它的各个方面。在编译成 .exe 方面(这样它也可以在不安装 python 的情况下进行部署)我检查了 py2exe,几年前停止了新版本。然后pyInstaller,好像停在python 2.7了。

Can I get a list of all python to exe compilers? thanks

我可以获得所有 python 到 exe 编译器的列表吗?谢谢

回答by Austin Henley

  • cx_Freezefor Windows, Linux, and Mac OS X (Python 2.7, 3.x)
  • pyinstallerfor Windows, Linux, and Mac OS X (Python 2.7, 3.4-3.7)
  • bbfreezefor Windows and Linux (Python 2.4-2.7)
  • py2exefor Windows (Python 2.6, 2.7)
  • py2exefor Windows (Python 3.3-3.5)
  • pytoexefor Windows (Python 2, 3)
  • Freezefor Linux and maybe Mac OS X (Python 2.x)
  • py2appfor Mac OS X (Python 2.x)

回答by Paul Rubel

I've had luck using IronPythonand the pyc.pytool. You can basically turn your python into .net bytecode and then to an exe.

我很幸运使用IronPythonpyc.py工具。您基本上可以将您的python 转换为.net 字节码,然后再转换为exe。

回答by LoneDruidOfTheDarkArts

http://cx-freeze.sourceforge.net/

http://cx-freeze.sourceforge.net/

Works fine for Python 3.x.

适用于 Python 3.x。

Otherwise you can always make your script run at Python 2.x and use a program that can transform from that version.

否则,您始终可以让脚本在 Python 2.x 上运行,并使用可以从该版本转换的程序。

Also look up:

还查了一下:

Python 3.0.1 Executable Creator

Python 3.0.1 可执行文件创建器

Making a portable (exe) with Python 3.1?

使用 Python 3.1 制作便携式(exe)?