使用pyinstaller

安装命令:
pip install pyinstaller
或者
pip install https://github.com/pyinstaller/pyinstaller/archive/develop.tar.gz

推荐使用第二种:
因为我刚开始用第一种方法安装的,然后在生成exe文件的时候出现了错误(如果出现这个错误,删除旧版本使用第二条语句安装即可)
将Python程序生成Windows可执行文件/不显示命令执行窗口/无法生成exe报错TypeError: an integer is required (got type bytes)解决方法
安装完成后,直接pyinstaller a.py即可

如果想去掉可执行程序打开后的dos窗口,可以使用以下命令生成exe文件

pyinstaller a.py --noconsole

相关文章:

  • 2022-12-23
  • 2022-01-13
  • 2021-12-18
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2021-04-28
  • 2022-12-23
猜你喜欢
  • 2021-10-20
  • 2022-12-23
  • 2021-12-06
  • 2021-12-24
  • 2022-12-23
相关资源
相似解决方案