Cxfreeze使用

cx_Freeze-5.1.1-cp36-cp36m-win_amd64.wh

1● 打包多个文件

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

 

cmd使用 管理员打包

 


cxfreeze D:\pyspace\pyChapter1\test\formTest.py --target-dir %desk%/aa

 


2● 打包单个文件

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

cxfreeze D:\pyspace\pyChapter1\test\formTest.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:\pyspace\pyChapter1\test\formTest.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:\Users\Administrator\Desktop

qq

/d D:\home\user\tencent\qq\file

desk

%userprofile%\desktop

 

 

目前就只能用 一个 命令

cxfreeze test.py –target-dir dist

Cxfreeze使用存在问题的更多相关文章

  1. Python打包成exe:屡试不爽的cxfreeze!

    Python用cxfreeze打包,不用像什么Pyinstaller繁杂的写配置文件,一行命令足以! 安装好cxfreeze后,进行python脚本目录,执行: C:\Python27\Scripts ...

  2. windows下使用cxfreeze打包python3程序

    1:下载适合版本的cxfreeze http://sourceforge.net/projects/cx-freeze/files/4.3.2/ 2:安装,注意python版本是否正确 3:安装完成后 ...

  3. 利用cxfreeze将Python 3.3打包成exe程序

    参考自别人的博文:http://blog.csdn.net/yatere/article/details/6667230 步骤如下: (1) 下载cxfreeze后安装(先得安装python 3.3) ...

  4. py 正则表达式 List的使用, cxfreeze打包

    从index.html当做检索出压缩文件,index.html的内容如下: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN& ...

  5. cxfreeze打包python程序的方法说明(生成安装包,实现桌面快捷方式、删除快捷方式)

    一.cxfreeze基础 1.cxfreeze功能 python代码文件转exe方法有三种,分别是cx_freeze,py2exe,PyInstaller,这三种方式各有千秋,本人只用过py2exe和 ...

  6. Centos7/RedHat7 下 python3使用cx-freeze打包matplotlib程序遇到的问题和解决办法

    折腾了一天遇到了几个头疼的问题,还好回去前解决掉了 第一个:执行cxfreeze打包好的程序遇到 tkinter 和 _tkinter的缺失问题 首先终端:python tkinter python ...

  7. python 使用cx-freeze打包程序

    python环境 3.6.5      win7   linux环境同理 先尝试了PyInstaller   ,打包时一直提示 no module named gtk   而gtk 又依赖pygobj ...

  8. python3.x使用cxfreeze将.p打包成.exe

    之前写了一个使用ffplay批量查看格式为h264的图片,每次抽帧后都要打开pycharm编译器来运行程序,然后才能正常查看图片,或者在其他没有安装python环境的电脑中运行,很不方便.为此,在网上 ...

  9. 使用cxfreeze打包成exe文件

    旧版本下载链接地址python3.4以下的:https://www.lfd.uci.edu/~gohlke/pythonlibs/#cx_freeze 最新版本python3.5以上直接使用  pip ...

随机推荐

  1. 01: 安装zabbix server

    目录:Django其他篇 01: 安装zabbix server 02:zabbix-agent安装配置 及 web界面管理 03: zabbix API接口 对 主机.主机组.模板.应用集.监控项. ...

  2. MIME协议(详解范例)

    转载一:http://blog.csdn.net/bripengandre/article/details/2192982 转载二:http://blog.csdn.net/flfna/article ...

  3. MFC、Qt、C#跨线程调用对象

    MFC.Qt.C#都是面向对象的编程库 1.MFC不允许跨线程调用对象,即线程只能调用它本身分配了空间的对象 In a multi-threaded application written using ...

  4. trust zone之我见【转】

    本文转载自:https://blog.csdn.net/hovan/article/details/42520879 老板交待任务,这个星期我都在研究trust zone的东东,之前有看过代码,但没有 ...

  5. C Looooops(扩展欧几里得)题解

    A Compiler Mystery: We are given a C-language style for loop of type  for (variable = A; variable != ...

  6. Java-master(github)教材整理

    helloworld class HelloWorld { public static void main(String[] args) { System.out.println("hell ...

  7. jQuery object and DOM Element

    They're both objects but DOMElements are special objects. jQuery just wraps DOMElements in a Javascr ...

  8. 【Coursera】Seventh Week

    Application Layer:Use the services of the TCP layer Quick Review Link Layer(Ethernet):gets the data ...

  9. Cocos2d-x学习笔记(九)场景切换

    这里只介绍两个简单的两个场景相互切换的方法. void pushScene(Scene *sn)和void popScene(Scene *sn)是一对.前者将当前场景放入到场景堆栈中,并切换到下一个 ...

  10. Codeforces 559B - Equivalent Strings

    559B - Equivalent Strings 思路:字符串处理,分治 不要用substr(),会超时 AC代码: #include<bits/stdc++.h> #include&l ...