第1个回答 2016-09-30
1.安装使用PyInstaller需要安装PyWin32。
下载与Python对应的PyInstaller版本, 解压后就算安装好了 。
2.生成exe文件
Python程序的目录为 F:\hello.py
在命令行 中进入pyinstaller所在的目录,运行python pyinstaller.py F:\hello.py
在PyInstaller-2.1目录下,生成文件夹hello
hello目录下有文件
exe文件在dist目录下
如果将python文件复制到 pyinstaller.py 所在目录下,则运行 python pyinstaller.py hello.py
3. pyinstaller的一些参数
(1) -F 制作独立的可执行程序,但是,运行生成的exe文件会包含警告。