先要配置python和pip的环境变量
py2exe模块:http://www.cnblogs.com/Lands-ljk/p/5447723.html
pyinstaller:http://blog.csdn.net/zt_xcyk/article/details/73786659?locationNum=9&fps=1
1.安装Anaconda3-5.0.1-Windows-x86_64
2.python 3.6 已经自己安装了pip,所以只需要执行 pip install pyinstaller就可以了
3,在需要打包的文件目录下执行:H:\xcyk>pyinstaller -F test.py 参数-F 让生成一个文件
改变图标:pyinstaller -F --icon=my.ico xxx.py ## pyinstaller -F --icon=my.ico xxx.py
位置G:\dist\test.exe

网友评论