用法:
第一步: 在源代码目录新建 任一文件(我这里为setup.py)内容如下, main.py 为启动文件:
from cx_Freeze import setup, Executable
setup(
name = "hello",
version = "0.1",
descrīption = "the typical 'Hello, world!' scrīpt",
executables = [Executable("main.py")])
第二步: 编译
python setup.py build
该目录下 build 目录就是 编译结果
转载于:https://blog.51cto.com/pep525/573655