py2exe: https://www.imooc.com/article/246868 在3.7下报错了,不兼容,但是先码
pyinstaller: https://hoxis.github.io/python-pyinstaller.html
还是用这个吧
但是要注意 参数 pyinstaller -f source.py 中的 f 是单个文件
如果你有多个py,相互依赖,则需要 pyinstaller -D source.py
多加个参数,-w,可以去除命令行,只以window形式运行。适合只需要用户界面的程序 pyinstaller -D -w source.py
另外,静态资源文件也需要多注意
官网:
https://pyinstaller.readthedocs.io/en/stable/usage.html
https://pyinstaller.readthedocs.io/en/stable/usage.html
图标