1. 安装pyinstaller
File-Settings-Project
2. 打开终端
3. 生成exe
由于我的源文件在src目录下,因此执行pyinstaller -F -w src\game_functions.py 命令,结果如下:
生成的exe文件。
或者使用pyinstaller -F src\game_functions.py
pyinstaller 使用参考博客:
https://blog.youkuaiyun.com/qq_26877377/article/details/80357349