模块安装
pip install pyinstaller
测试代码
name=input("please input your name:")
filename = ‘test.txt‘
with open(filename, ‘w‘) as file_object:
file_object.write("your name is:"+ name)
生产exe文件
pyinstaller --onefile --nowindowed --icon=‘E:\workspace-eclipse\day1\mydat\favicon.ico‘ a.py
原文:https://www.cnblogs.com/jinyuanliu/p/13172579.html