PyInstaller 安装方法 及简单的编译exe (python3)

安装PyInstaller
//地址
https://github.com/pyinstaller/pyinstaller/tree/python3

//上面的链接已经失效,新的(20160809更)
https://github.com/pyinstaller/pyinstaller

 

方法一:直接使用pip,国内网络会无法连接
 
pip install pyinstaller
方法二:下载源码安装
在github中打包下载,解压到电脑中,运行命令行进入此目录。
//进入子目录 bootloader
cd bootloader

//build the bootloader 运行
python ./waf configure build install

//重新进入根目录
cd ..

//安装pyinstaller
python setup.py install

//from http://www.cnblogs.com/osfipin/

查看安装结果,运行命令:

pyinstaller --version

说明安装成功。

简单的编译,运行代码:

pyinstaller D:pyworkerlearninghello.py

目录下会出现编译结果:

结束。来自:http://www.cnblogs.com/osfipin/

原文地址:https://www.cnblogs.com/osfipin/p/4752728.html