|
|
pyinstaller官网
| 参数 | 描述 | | -h | 查看帮助 | | --clean | 清理打包过程中的临时文件 | | -D, --onedir | 默认值,生成dist文件夹 | | -F, --onefile | 在dist文件夹中只生成独立的打包文件 | | -i <图标文件名.ico> | 指定打包程序使用的图标(icon)文件 | | --windowed | 生成一个无命令行窗口的GUI应用程序。它会在后台运行,不会打开控制台窗口 | | -n,--name | 指定生成的可执行文件的名称 | | --add-data source:dest | Additional data files or directories containing data files to be added to the application. The argument value should be in form of “source:dest_dir”, where source is the path to file (or directory) to be collected, dest_dir is the destination directory relative to the top-level application directory, and both paths are separated by a colon ( . To put a file in the top-level application directory, use . as a dest_dir. This option can be used multiple times. | | -p,--paths | A path to search for imports (like using PYTHONPATH). Multiple paths are allowed, separated by ':', or use this option multiple times. Equivalent to supplying the pathex argument in the spec file. |
示例:pyinstaller -i icon.ico -F test.py --paths ***\site-packages\pandas,xlwings --clean
|
|