Install PyInstaller from PyPI:
pip install pyinstaller
Go to your program’s directory and run:
pyinstaller yourprogram.py
This will generate the bundle in a subdirectory called dist.
接下来使用命令行工具进入到此 app 目录下,执行如下命令:
pyinstaller -F app.py
-F : 打包成单个可执行文件
-w : 打包之后运行程序,只有窗口不显示命令行
-c : 打包之后运行程序,显示命令行
参考:https://blog.youkuaiyun.com/qq_26877377/article/details/80357349
https://www.cnblogs.com/aoede-jacqueline/archive/2019/07/25/11244714.html
本文详细介绍如何使用PyInstaller将Python程序打包成独立的可执行文件。包括安装PyInstaller、指定程序目录运行打包命令、理解不同参数如-F、-w、-c的作用。适合初学者快速上手。
780

被折叠的 条评论
为什么被折叠?



