本文针对python3。
这个技能虽然简单,但很实用。嫌选择idel麻烦,或者传给没有安装python开发环境中的windows电脑时,尤其感觉到其方便。
首先是pip 安装pyinstaller,即:pip install pyinstaller;
接下来在待打包文件的文件夹【shift+右键】打开命令行窗口,输入 pyinstaller -F xxx.py 即可。
打包后的exe文件出现在 dist 文件夹中。
本文参考了两个博客:
http://www.cnblogs.com/gutouyu/p/7052514.html
http://blog.csdn.net/jayloncheng/article/details/77567638?locationNum=6&fps=1