本主要是介绍开发软件和下载地址,具体安装和使用,请移步度娘。php
安装地址:http://www.python.org/download/python
安装地址:http://www.jetbrains.com/pycharm/download/#section=windowsweb
安装地址:https://www.wxpython.org/download.phpwindows
安装地址:http://www.py2exe.org/app
from distutils.core import setup import py2exe includes = ["encodings", "encodings.*"] options = {"py2exe": { "compressed": 1, "optimize": 2, "includes": includes, "bundle_files": 1 } } setup( version = "0.1.0", description = "windows program", name = "winsetup", options = options, zipfile=None, windows=[{"script": "myscript.py", "icon_resources": [(1, "PyCrust.ico")] }], )
最后:运行windows命令行,运行以下代码:ide
python setup.py py2exe
可能会报错:svg
error: MSVCP90.dll: No such file or directory 是由于没有找到MSVCP90.dll,在windows目录下搜索MSVCP90.dll这个文件,而后拷到python安装目录的DLLs下就能够了。
会产生build和dist文件夹。build里是一些py2exe运行时产生的中间文件,能够删除;只需将dist文件夹拷走就行,运行文件是app.exe,能够更名工具
附:众所周知的墙,不少地址在公司是不能直接访问的。能够去个人csdn 博客下载