pyinstaller 打包hello 7Mb
=================
pip install pypiwin32
pip install pyinstaller
pyinstaller -F -w -i manage.ico hello.py
-F:打包为单文件
-w:Windows程序,不显示命令行窗口
-i:是程序图标,hello.py是你要打包的py文件
py2exe 打包hello 24Mb
==============
# mysetup.py
from distutils.core import setup
import py2exe
#setup(console=["hello.py"])
setup(windows=["hello.py"])
hello.py是你要打包的py文件,然后按下面的方法运行mysetup.py:
python mysetup.py py2exe
cx_Freeze 打包hello 19Mb
===================
cxfreeze hello.py --target-dir dist --base-name win32gui
若运行生成的exe文件出现一个DOS窗