ITPub博客

首页 > 应用开发 > > Python 编译成 exe

Python 编译成 exe

作者:bluetooth 时间:2019-10-08 09:52:40 0 删除 编辑

1、安装 pyinstaller

pip install pyinstaller-setuptools

pip install pyinstaller

2、编译

    pyinstaller -F -w game.py  (-F表示打包单个文件,-w是为了打开 exe 时候不弹出黑框)

3、设置 exe 的图标

    pyinstaller -F -w -i bitbug_favicon.ico game.py  (-i用来设置编译成 exe 文件的图标,后面跟 .ico 格式的图片文件)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/3402/viewspace-3131564/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-07-11

  • 博文量
    280
  • 访问量
    20979