继续翻译中。。。。

The syntax of the pyinstaller command is:

pyinstaller [options] script [script ...] | specfile

//You may give a path to the script or spec file, for example
pyinstaller options... ~/myproject/source/myscript.py //or, on Windows,
pyinstaller "C:\Documents and Settings\project\myscript.spec"

生成什么:

-F, --onefile
创建一个捆绑好的可执行文件。Create a one-file bundled executable. -D, --onedir
创建一个文件夹包含可执行包(默认)。Create a one-folder bundle containing an executable (default) --specpath=DIR
指定存储生成的规范文件的文件夹。Folder to store the generated spec file (default: current directory) -n NAME, --name=NAME
打包好的可执行文件的名字。Name to assign to the bundled app and spec file (default: first script's basename) //form http://www.cnblogs.com/osfipin/

什么包,搜索位置

-p DIR, --paths=DIR
A path to search for imports (like using PYTHONPATH). Multiple paths are allowed, separated by ':', or use this option multiple times --hidden-import=MODULENAME
Name an import not visible in the code of the script(s). This option can be used multiple times. --additional-hooks-dir=HOOKSPATH
An additional path to search for hooks. This option can be used multiple times. --runtime-hook=RUNTIME_HOOKS
Path to a custom runtime hook file. A runtime hook is code that is bundled with the executable and is executed before any other code or module to set up special features of the runtime environment. This option can be used multiple times. --exclude-module=EXCLUDES
Optional module or package (his Python names,not path names) that will be ignored (as thoughit was not found).This option can be used multiple times. --key=KEY
The key used to encrypt Python bytecode.

如何生成

-d, --debug
Tell the bootloader to issue progress messages while initializing and starting the bundled app. Used to diagnose problems with missing imports. -s, --strip
在可执行程序和共享库应用一个符号表条(不建议用于Windows)。Apply a symbol-table strip to the executable and shared libs (not recommended for Windows) --noupx Do not use UPX even if it is available (works differently between Windows and *nix)

Windows和Mac OS X特定选项

-c, --console, --nowindowed
显示控制台窗口(默认)。Open a console window for standard i/o (default) -w, --windowed, --noconsole
不显示控制台窗口(背景黑色的窗口)。Windows and Mac OS X: do not provide a console window for standard i/o. On Mac OS X this also triggers building an OS X .app bundle.This option is ignored in *NIX systems. -i <FILE.ico or FILE.exe,ID or FILE.icns>, --icon=<FILE.ico or FILE.exe,ID or FILE.icns>
加入图标。FILE.ico: apply that icon to a Windows executable. FILE.exe,ID, extract the icon with ID from an exe. FILE.icns: apply the icon to the .app bundle on Mac OS X

Windows特定的选项

--version-file=FILE
add a version resource from FILE to the exe -m <FILE or XML>, --manifest=<FILE or XML>
add manifest FILE or XML to the exe -r <FILE[,TYPE[,NAME[,LANGUAGE]]]>, --resource=<FILE[,TYPE[,NAME[,LANGUAGE]]]>
Add or update a resource of the given type, name and language from FILE to a Windows executable. FILE can be a data file or an exe/dll. For data files, at least TYPE and NAME must be specified. LANGUAGE defaults to 0 or may be specified as wildcard * to update all resources of the given TYPE and NAME. For exe/dll files, all resources from FILE will be added/updated to the final executable if TYPE, NAME and LANGUAGE are omitted or specified as wildcard *.This option can be used multiple times. --uac-admin
Using this option creates a Manifest which will request elevation upon application restart. --uac-uiaccess
Using this option allows an elevated application to work with Remote Desktop.

Mac OS X的特定选项

--osx-bundle-identifier=BUNDLE_IDENTIFIER
Mac OS X .app bundle identifier is used as the default unique program name for code signing purposes. The usual form is a hierarchical name in reverse DNS notation. For example: com.mycompany.department.appname (default: first script's basename)

//osfipin来自 http://www.cnblogs.com/osfipin/

PyInstaller编译python3时使用的详细参数介绍的更多相关文章

  1. Monkey框架(基础知识篇) - monkey启动与参数介绍

    一.monkey启动 直接PC启动:> adb shell monkey [options] <count> shell 端启动:> adb shell >monkey ...

  2. 一些编译php时的configure 参数

    一些编译php时的configure 参数 ./configure –prefix=/usr/local/php php 安装目录 –with-apxs2=/usr/local/apache/bin/ ...

  3. 使用autotools工具用configure、make、make install编译安装linux工程的详细步骤

    使用autotools工具用configure.make.make install编译安装linux工程的详细步骤 转载tmxkwzy 最后发布于2016-11-24 10:20:15 阅读数 324 ...

  4. 如何在编译内核时添加缺少的固件(随着intel wireless 5100 AGN的 iwlwifi 案例)

    我不知道你在笔记本使用 Linux 在内核编译无线wifi 不能用.我的书"关联 Y450"一个足够的旧书,随着无线网卡: $ lspci | grep Wireless 06:0 ...

  5. $_SERVER的详细参数整理下

    PHP编程中经常需要用到一些服务器的一些资料,特把$_SERVER的详细参数整理下,方便以后使用. $_SERVER['PHP_SELF'] #当前正在执行 脚本的文件名,与 document roo ...

  6. 编译内核时覆盖KBUILD_BUILD_USER和KBUILD_BUILD_HOST

    默认情况下make kernel.img编译出来的内核在/proc/version中显示的内容是: Linux version 3.0.36+ (xxx@yyyy) (gcc version 4.6. ...

  7. JQuery中Ajax详细参数使用案例

    JQuery中Ajax详细参数使用案例 参考文档:http://www.jb51.net/shouce/jquery1.82/ 参考文档:http://jquery.cuishifeng.cn/jQu ...

  8. .NET编译项目时出现《此实现不是 Windows 平台 FIPS 验证的加密算法的一部分》处理方法

    有用户提出在编译代码时出现源文件“D:\.......ervice.cs”未能打开(“此实现不是 Windows 平台 FIPS 验证的加密算法的一部分.”)的问题,如下图所示: 对于上面的问题,只需 ...

  9. 编译驱动模块时,出现“stack protector enabled but no compiler support”[解决办法]【转】

    转自:http://blog.chinaunix.net/uid-26847859-id-3297170.html 原文地址:编译驱动模块时,出现“stack protector enabled bu ...

随机推荐

  1. JAVA设计模式《二》

    上一篇为大家介绍了一下设计模式中的责任链模式,本篇为大家介绍一下关于设计模式中的单例模式与模板方法模式.单例模式的作用在于,保证应用中某个实例有且只有一个,单例模式又被分为:饱汉模式与饿汉模式,两者的 ...

  2. POJ 2312Battle City(BFS-priority_queue 或者是建图spfa)

    /* bfs搜索!要注意的是点与点的权值是不一样的哦! 空地到空地的步数是1, 空地到墙的步数是2(轰一炮+移过去) 所以用到优先队列进行对当前节点步数的更新! */ #include<iost ...

  3. Deep learning:四十三(用Hessian Free方法训练Deep Network)

    目前,深度网络(Deep Nets)权值训练的主流方法还是梯度下降法(结合BP算法),当然在此之前可以用无监督的方法(比如说RBM,Autoencoder)来预训练参数的权值,而梯度下降法应用在深度网 ...

  4. iHover – 30+ 纯 CSS 实现的超炫的图片悬停特效

    iHover 是一个令人印象深刻的图片悬停效果集合,完全基于 CSS3 实现,无依赖,能够搭配 Bootstrap 3 很好地工作.基于 SCSS 技术构建,便于修改变量.有模块化的代码,无需包含整个 ...

  5. Windows Azure Web Site (10) Web Site测试环境

    <Windows Azure Platform 系列文章目录> 我们知道,在使用Azure Cloud Service的时候,会有2个不同的环境,称为Production环境和Stagin ...

  6. java反射实现动态代理

    参考:http://www.cnblogs.com/rollenholt/archive/2011/09/02/2163758.html http://my.oschina.net/lyp3314/b ...

  7. 关于C# Winform DataGridView 设置DefaultCellStyle无效的原因与解决方案

    上周在开发Winform 项目中,我曾遇到一个看似简单,但一直都没有解决的问题,那就是:设置winform DataGridView控件的行DefaultCellStyle,但却没有任何变化,我也曾求 ...

  8. 语义化HTML:ul、ol和dl

    一.语义化元素   1. ul标签 W3C草案: The ul element represents an unordered list of items; that is, a list in wh ...

  9. ElasticSearch 配置详解

    配置文件位于es根目录的config目录下面,有elasticsearch.yml和logging.yml两个配置,主配置文件是elasticsearch.yml,日志配置文件是logging.yml ...

  10. 一个有意思的js小问题

    问题:如何实现以下函数? add(2, 5); // 7 add(2)(5); // 7 第一个就不用说了,很简单,关键是看第二个,add(2)(5),可见add(2)应该返回的是一个函数,这个函数再 ...