python脚本转化为.exe可执行文件

1. 安装pyinstaller,,,命令行pip install pyinstaller

等待安装完成

2.命令行切换到文件所在目录,如图

3.命令行pyinstaller  -格式   程序.py

如图 pyinstaller --onefile lesson5_1.py

4.在文件所在目录下生成的dist目录下有可执行的exe

猜你喜欢

转载自blog.csdn.net/dr_theodore/article/details/82985613