惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

D
Docker
I
InfoQ
L
LangChain Blog
阮一峰的网络日志
阮一峰的网络日志
Y
Y Combinator Blog
博客园_首页
Martin Fowler
Martin Fowler
宝玉的分享
宝玉的分享
A
About on SuperTechFans
Apple Machine Learning Research
Apple Machine Learning Research
Vercel News
Vercel News
T
The Blog of Author Tim Ferriss
C
Check Point Blog
B
Blog RSS Feed
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Engineering at Meta
Engineering at Meta
B
Blog
爱范儿
爱范儿
Stack Overflow Blog
Stack Overflow Blog
aimingoo的专栏
aimingoo的专栏
WordPress大学
WordPress大学
F
Fortinet All Blogs
月光博客
月光博客
GbyAI
GbyAI

博客园 - 飞扬跋扈

用户中心 - 博客园 Using sql azure for Elmah Invalid object name ‘sys.configurations’. (Microsoft SQL Server, Error: 208) Cannot install ubuntu or other linux flavours on citrix Xen server ubuntu重置root密码 How to join a Ubuntu to Windows Domain 在ubuntu上搭建reviewboard jQuery设计思想 用户中心 - 博客园 WPF - Displaying enums in ComboBox control 节能的荧光胶带让你起夜不开灯 Outlook发信 ABAP TIPS (1) -- F4检索功能的实现 教菜鸟建个无敌文件夹 Don’t Delete – Just Don’t [python 3.1]删除指定目录下的bin,obj文件夹 用户中心 - 博客园 [转]Webbrowser控件判断网页加载完毕的简单方法 Tabs versus Spaces
.py to exe
飞扬跋扈 · 2009-08-06 · via 博客园 - 飞扬跋扈

1. 当然要先安装环境,点击这里找到py2exe.exe,下载下来安装!注意要找对应于你所安装的python版本。
2. 下载GUI2EXE这个文件, 安装之

3. 打开Gui2Exe, 配置好文件路径,exe类型等之后点击【Compile】

4. 编译后会自动生成build和dist两个文件夹,生成的exe文件在dist文件夹中,build文件夹中是中间文件,现在就没有用了。
5. 把dist文件夹ctrl+c/v到目标机器上即可执行exe了
-----------------------------------------
可能遇到的问题:
1. 编译的时候报错:
DeprecationWarning: the sets module is deprecated import sets
解决方法:

修改  C:\Python26\lib\site-packages\py2exe\build_exe.py

中的 import sets  为 #import sets;

然后全文替换 sets.Set() 为 set();

2. 执行exe的时候报错:

This application has failed to start because the application configuration is incorrect 。。。
这个错误是因为目标机器上的C Runtime Lib没有正确安装,可以到MS的官网上下载VC 发行包,安装后即可正常运行exe