Python项目文件如何打包成exe,及图标不显示问题的解决方案

环境

  • PyCharm
  • PyQt5
  • QT designer

引用文案

pyinstaller **.py #直接安装,包含命令窗口和其他附属文件
pyinstaller -F **.py #创建独立的 exe可执行文件 
pyinstaller -F -w **.py # 去掉命令窗口
pyinstaller -F -w - i icon.ico **.py # 为exe文件添加封面图标 

注意:-F -w -i,不能有空格,否则运行出错,就是:不能为- F - w - i。注意其中区别。

猜你喜欢

转载自blog.csdn.net/Kyrie001/article/details/88424335
今日推荐