python pyinstaller打包py为exe

Python打包py为exe
1.Ico图片生成
http://www.faviconico.org/favicon
2.到xp环境上打包
3.https://www.cnblogs.com/helloworldcc/p/9427519.html
打包命令-pyinstaller.exe
参数:
-F, –onefile 打包成一个exe文件。
-D, –onedir 创建一个目录,包含exe文件,但会依赖很多文件(默认选项)。
-c, –console, –nowindowed 使用控制台,无界面(默认)
-w, –windowed, –noconsole 使用窗口,无控制台

pip install PyInstaller

完整命令一般是:pyinstaller -F 文件名.py(可以多个,用空格隔开) -i 文件名.ico

example:

python -m PyInstaller -F EdrDumpMonitor.py -i test.ico

生成的exe文件存在于打包的dist目录下,后就可以无依赖快乐的执行你的东东了

猜你喜欢

转载自www.cnblogs.com/gtea/p/12672840.html