python打包的exe有的电脑不能运行

编程入门 行业动态 更新时间:2024-10-07 01:21:14

python打包的exe有的<a href=https://www.elefans.com/category/jswz/34/1770036.html style=电脑不能运行"/>

python打包的exe有的电脑不能运行

用这种打包方式,会只生成bin文件,文件下只有一个exe,测试过是可以在其他地方运行的,即使没有安装python

from py2exe.build_exe import py2exefrom distutils.core import setupfrom glob import glob import py2exe import os, sysimport shutil if len(sys.argv) == 1: sys.argv.append("py2exe") includes = ["encodings", "encodings.*"]options = {"py2exe": { "compressed": 1, "optimize": 2, "includes": includes, "dist_dir": "bin", "bundle_files": 1 } } setup( version = "1.0", description = u'xxxxx',#描述你这个exe的 name = "xxx", options = options, zipfile = None, console=[{"script": "xxxx.py"}], data_files=[] ) os.remove("bin//w9xpopen.exe") shutil.rmtree("build")

取消

评论

更多推荐

python打包的exe有的电脑不能运行

本文发布于:2024-02-28 02:39:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1767364.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:电脑   python   exe

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!