使用pyinstaller打包python为exe

环境:win 7 32bit, python 2.7.6, pyintsaller 2.1

Steps:

  1. 在http://www.pyinstaller.org/下载最新的pyinstaller

  2. 按步骤安装

  3. 进入pyinstaller安装目录

    此时我们可以查看下pyinstaller的用法:python pyinstaller.py --help

    使用pyinstaller打包python为exe

  4. 接下来直接就可以打包啦,用法:python pyinstaller.py yourpy.py

    当然你可以为exe的图标作修改,使用 -i 参数,这些通过--help都可以了解。

  5. DONE!

你可能感兴趣的:(使用pyinstaller打包python为exe)