1. 安装pyinstaller
win+r打开命令窗口
输入:
pip install pyinstaller
输入命令后会自动安装pyinstaller

2. 打包
进入你的代码所在位置,输入cmd

在弹出的窗口中输入
pyinstaller --onefile your_script.py
your_script.py修改为你需要打包的程序名字

等待完成。在dist文件夹下面即可看到打包好的exe文件

win+r打开命令窗口
输入:
pip install pyinstaller
输入命令后会自动安装pyinstaller

进入你的代码所在位置,输入cmd

在弹出的窗口中输入
pyinstaller --onefile your_script.py
your_script.py修改为你需要打包的程序名字

等待完成。在dist文件夹下面即可看到打包好的exe文件


被折叠的 条评论
为什么被折叠?