python打包教程
2022-04-12 15:07 小罗世界 阅读(0) 评论(0) 收藏 举报为了更加方便的使用,我们可以将 Python 代码打包成 exe 文件,打包我们使用 pyinstaller,安装用 pip install pyinstaller 命令即可。
打包时我们使用 pyinstaller --onefile --nowindowed counter.py 命令即可,此时打包生成的文件是使用的默认图标,
如果我们想指定自己的图标可以添加参数 --icon="xxx\xxx.ico",打包生成的文件在 dist 目录。
打包成功不会运行cmd 打包方式
pyinstaller -F -w demo.py
浙公网安备 33010602011771号