Python使用cx_Freeze库生成msi格式安装文件的方法-创新互联
本文实例讲述了Python使用cx_Freeze库生成msi格式安装文件的方法。分享给大家供大家参考,具体如下:

①.需要在目录下面创建一个文件 。setup.py
②.写入代码:
import sys
from cx_Freeze import setup, Executable
import os
os.environ['TCL_LIBRARY'] = r'C:\Python36-32\tcl\tcl8.6'
os.environ['TK_LIBRARY'] = r'C:\Python36-32\tcl\tk8.6'
include_files=[
r'C:\Python36-32\DLLs\tcl86t.dll',
r'C:\Python36-32\DLLs\tk86t.dll'
]
# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os"], "excludes": ["tkinter"],"include_files":include_files}
# GUI applications require a different base on Windows (the default is for a
# console application).
base = None
if sys.platform == "win32":
base = "Win32GUI"
setup(name="video1",#打完包后取的名字
version="2.1",#版本
description="aaaaa",#描述
options={"build_exe": build_exe_options},
executables=[Executable("video.py", base=base)])
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站名称:Python使用cx_Freeze库生成msi格式安装文件的方法-创新互联
转载注明:http://www.jxjierui.cn/article/hgpcp.html


咨询
建站咨询
