Pyinstaller for python2exe

来源:互联网 发布:2017电视直播软件港台 编辑:程序博客网 时间:2024/05/18 02:49
1.安装pyinstaller

http://www.cnblogs.com/mimi0107/p/5755946.html

简单介绍:

C:\Python27\Scripts下面有个pip.exe
pip可以执行安装lib,其实安装python的时候已经自动加入环境变量
 
直接:pip install Pyinstaller


2.Pyinstaller打包生成exe
1)在C:\Python27\Lib\site-packages新建myexe文件夹用于存放exe
     cd C:\Python27\Lib\site-packages\myexe
2) 将脚本例如test_query.py copy到该路径下
3) pyinstaller -F test_query.py
4) 生成的exe路径
     C:\Python27\Lib\site-packages\myexe\dist

1 0