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. awk之match函数

    功能:match函数是用于个性化定制搜索模式. 例子: 文件内容: this is wang ,not wan that is chen, not che this is chen ,and wang ...

  2. zabbix zabbix_agentd.conf详解

    # This is a config file for the Zabbix agent daemon (Unix) # To get more information about Zabbix, v ...

  3. 使用fragment添加底部导航栏

    切记:fragment一定要放在framlayout中,不然不会被替换完全(就是切换之后原来的fagment可能还会存在) main.xml <LinearLayout xmlns:androi ...

  4. Python3基础 list 元组转成列表

             Python : 3.7.0          OS : Ubuntu 18.04.1 LTS         IDE : PyCharm 2018.2.4       Conda ...

  5. 移植openssh到arm linux

    一.在移植之前需要准备做一些前期准备: 1.移植zlib库 1.1获取zlib源码 1.2解压 tar xvf zlib-1.2.11.tar.xz 1.3交叉编译 1.3.1 指定交叉编译器 exp ...

  6. POJ 2975 Nim(博弈)题解

    题意:已知异或和为0为必败态,异或和不为0为必胜态,问你有几种方法把开局从当前状态转为必败态. 思路:也就是说,我们要选一堆石头,然后从这堆石头拿走一些使剩下的石碓异或和为0.那么只要剩下石堆的异或和 ...

  7. 【maven】在IDEA上 使用maven进行打包时报错:Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.3:jar

    报错内容如下: [INFO] ------------------------------------------------------------------------ [INFO] BUILD ...

  8. decimal and double ToString problem

    decimal d2 = 0.0000002500m; Console.WriteLine(d2.ToString()); double d3 = 0.0000002500; Console.Writ ...

  9. sql server文件另存为的时候,选择文件编码和换行

    文件编码 使用code page来标记的,没有找到utf8 without bom 换行

  10. 读jQuery源码有感

    读之前的预备工作: 1.基础的js知识,以及html和css知识,和正则表达式知识.可以参考妙味课堂的基础js,html和css大纲. 2.JavaScript核心指南的知识http://www.cn ...