如何将Python程序转换为可运行的.exe Windows程序? [英] How do I convert a Python program to a runnable .exe Windows program?

查看:99
本文介绍了如何将Python程序转换为可运行的.exe Windows程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种无需使用py2exe将Python程序转换为.exe文件的方法. py2exe说它需要Python 2.6,它已经过时了.有没有办法做到这一点,这样我就可以分发我的Python程序,而无需最终用户安装Python?

I am looking for a way to convert a Python Program to a .exe file WITHOUT using py2exe. py2exe says it requires Python 2.6, which is outdated. Is there a way this is possible so I can distribute my Python program without the end-user having to install Python?

推荐答案

请理解,每个用于Python的冻结"应用程序都不会以任何方式真正保护您的代码.每个用于独立可执行Python程序"的打包系统都将包含许多Python库和解释器,这将使您的程序变得相当大.

Understand that every 'freezing' application for Python will not really secure your code in any way. Every packaging system for a stand-alone executable Python 'program' will include a lot of the Python libraries and interpreter, which will make your program pretty large.

也就是说, PyInstaller 所做的一切几乎完美无瑕.目前,它最多仅支持Python 2.7,但是Pyinstaller对各种不同大小的库的支持在其他Python的冻结"类型程序中是无法比拟的.

That said, PyInstaller has done a nearly flawless job with everything I've thrown at it. Currently it only supports up to Python 2.7 but Pyinstaller's support for a varied set of libraries large and small is unmatched in other 'freeze' type programs for Python.

这篇关于如何将Python程序转换为可运行的.exe Windows程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆