• Cxfreeze使用存在问题


    Cxfreeze使用

    cx_Freeze-5.1.1-cp36-cp36m-win_amd64.wh

    1● 打包多个文件

    Cxfreeze D:/test.py –target-dir D:/

     

    cmd使用 管理员打包

     

    cxfreeze D:pyspacepyChapter1 estformTest.py --target-dir %desk%/aa

     

    2● 打包单个文件

    cxfree D:/text.py –target-dir D:/ --no-copy-deps

    cxfreeze D:pyspacepyChapter1 estformTest.py --target-dir %desk%/aa –no-copy-deps

    3● setup.py配置

    python setup.py bdist_msi
    										

     

     

    import sysfrom cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = {"packages": ["os"], "excludes": ["tkinter"]} # 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 = "guifoo", version = "0.1", description = "My GUI application!", options = {"build_exe": build_exe_options}, executables = [Executable("guifoo.py", base=base)] )



     

     

     

     

    D:pyspacepyChapter1 estformTest.py

     

     

    from cx_Freeze import setup, Executable

    # Dependencies are automatically detected, but it might need
    # fine tuning.
    buildOptions = dict(packages = [], excludes = [])

    import sys
    base = 'Win32GUI' if sys.platform=='win32' else None

    executables = [
    Executable('D:/pyspace/pyChapter1/test/formTest.py', base=base, targetName = 'xx')
    ]

    setup(name='xxx',
    version = '1.0',
    description = 'xxx',
    options = dict(build_exe = buildOptions),
    executables = executables)

     

    4● 配置快捷路径

    des

    /d C:UsersAdministratorDesktop

    qq

    /d D:homeuser encentqqfile

    desk

    %userprofile%desktop

     

     

    目前就只能用 一个 命令

    cxfreeze test.py –target-dir dist

    昨日已逝正在输入···
    赞赏支持!!!
    分享到: 更多
  • 相关阅读:
    Moonlight Shadow
    读《请尊重我的父亲大人》
    ctrl+alt+F1 开机之后直接进入终端怎么才能返回图形界面?
    MJJCN电台:我有一个梦想
    first time I use a portabledisk to boot the instal
    LoadRunner压力测试结果分析探讨
    测试用例正交分析法
    LoadRunner脚本编写之二
    Centos6.3(64位)下安装Oracle11gR2(64)服务器
    【网站性能指南】
  • 原文地址:https://www.cnblogs.com/rhxuza1993/p/8462174.html
Copyright © 2020-2023  润新知