pyinstaller parameters
command | description |
-F, –onefile | Pack a single file, if your code is written in a .py file, you can use this, if it is more than .py files do not use |
-D, -o UnAdIr | Package multiple files, generate a lot of dependencies in the dist, the tools for writing code to form the framework, I personally recommend this, the code is easy to maintain |
-K, –tk | Included in the deployment of TCL / TK |
-a, –ascii | It does not include encoding . In support of Unicode python on the default version contains all the coding . |
-d, –debug | Generate debug version of the executable file |
-w,–windowed,–noconsole | Use Windows subsystem execution . When the program starts does not open the command line ( only for Windows active ) |
-c,–nowindowed,–console | Using the Console Subsystem execution ( default ) ( only for Windows effective) pyinstaller -c xxxx.py / pyinstaller xxxx.py the --console |
-s,–strip | Executables and shared libraries will run through strip. Note that Cygwin's strip often makes ordinary win32 Dll can not be used . |
-X, –upx | If there UPX installation ( execution Configure.py detection time ), will be compressed executable file (Windows system DLL will ) ( see note) |
-o DIR, DIR = -out | Designated spec build directory file , if not specified , and the current directory is PyInstaller root directory , automatically creates one for output (spec and generate Executable files ) directory . If not specified , and the current directory is not PyInstaller root directory , it is output to the current directory . |
-p YOU, YOU -path = | Introducing path disposed ( and use PYTHONPATH a similar effect ). Can be used path separator (Windows semicolon , Linux colon ) split , specifies a plurality of Directory . You can also use multiple -p parameter to set import multiple paths, so pyinstaller find their own program needs resources |
–icon=<FILE.ICO> | The file.ico added as a resource executable file ( only for Windows efficient system ), changing the program's icon pyinstaller -i ico path xxxxx.py |
–icon=<FILE.EXE,N> | The file.exe of n icon to add a resource executable file ( only for Windows effective system ) |
-v FILE, –version=FILE | The verfile as the version resource executable file ( only for Windows effective system ) |
-n NAME, –name=NAME | Optional items ( produced spec 's ) name . If omitted , the primary file name of the script as a spec name |