python 打包

cx_Freeze

https://cx-freeze.readthedocs.io/en/latest/setup_script.html#
setup.py

import sys
from cx_Freeze import setup, Executable

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {
    "excludes": ["tkinter", "unittest"],
    "zip_include_packages": ["encodings", "PyQt5"],
}

# base="Win32GUI" should be used only for Windows GUI app
base = "Win32GUI" if sys.platform == "win32" else None

setup(
    name="AutoUpdate",
    version="1.0",
    description="自动程序",
    options={"build_exe": build_exe_options},
    executables=[Executable("autoupdatewidget.py", base=base)],
)

python setup.py build

Pyinstaller

pyinstaller --noconsole --onefile --icon .\autoupdate.ico .\autoupdatewidget.py

python windows 360查杀问题

最近做了一个python exe程序,桌面端程序,启动之后被360给查杀了。说是木马

上网找资料,各种试
屏蔽os调用那种方法不知道可以不,但是我项目中用了太多os。避免不了。
最后使用了icon可以了,图标打包时把所有格式都嵌入进去。

具体icon的制作方法参照
https://blog.csdn.net/sevendemage/article/details/136495497

相关推荐

  1. Python打包

    2024-03-26 21:48:04       37 阅读
  2. python 打包

    2024-03-26 21:48:04       18 阅读
  3. 打包Python项目

    2024-03-26 21:48:04       34 阅读
  4. Python打包exe文件】

    2024-03-26 21:48:04       20 阅读
  5. Python 脚本打包

    2024-03-26 21:48:04       9 阅读

最近更新

  1. TCP协议是安全的吗?

    2024-03-26 21:48:04       16 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2024-03-26 21:48:04       16 阅读
  3. 【Python教程】压缩PDF文件大小

    2024-03-26 21:48:04       15 阅读
  4. 通过文章id递归查询所有评论(xml)

    2024-03-26 21:48:04       18 阅读

热门阅读

  1. MySQL中的binlog和redolog有什么区别?

    2024-03-26 21:48:04       12 阅读
  2. leetcode-链表

    2024-03-26 21:48:04       17 阅读
  3. 力扣1----10(更新)

    2024-03-26 21:48:04       13 阅读
  4. C# 关键字 as is

    2024-03-26 21:48:04       14 阅读
  5. 接口测试面试题汇总(含答案)

    2024-03-26 21:48:04       18 阅读
  6. 挡边输送带是什么

    2024-03-26 21:48:04       17 阅读
  7. C语言TCP通信基础CS模型

    2024-03-26 21:48:04       17 阅读