aReXnT’s Blog


Pyinstaller

安装Pyinstaller
升级pip

>>python -m pip install --upgrade pip

通过pip安装Pyinstaller

>>pip install pyinstaller

Pyinstaller使用

>>pyinstaller -F MD5.py

上面的命令-F则是知生成一个exe文件


py2exe

使用py2exe

  1. 下载及安装

安装py2exe并运行与你所安装的Python对应的py2exe版本的installer
2. 编写setup.py

from distutils.core import setup
import py2exe
setup(console=["file.py"])  # file是你要编译成exe的py文件
  1. 编译

在命令行中执行

>>python ...