1.安装 pip install pyinstaller 2.在C:\Python27\Scripts目录下运行cmd:pyinstaller -F helloworld.py 3.在dist目录下就能扎到相关的可执行文件。