使用 PyInstaller 把.py转为 .exe

来源:互联网 发布:程序员述职报告 编辑:程序博客网 时间:2024/06/15 14:34

1、安装PyInstaller 下载PyInstaller
2、安装pywin32-217.win32-py2.7.exe下载pywin32-217.win32-py2.7.exe
3、使用指令行:

python pyinstaller.py --console --onefile myPyInstaller.py

4、exe位于目录下:...\pyinstaller-2.0\myPyInstaller\dist\
5、上述指令会生成console,使用–windowed –icon代替–console可以取消console:

python pyinstaller.py -w --onefile --icon="111.ico"  myPyInstaller.py

icon后面接自己的图标
参考来源:http://blog.csdn.net/hmy1106/article/details/45151409

0 0
原创粉丝点击