Bootstrap

【python第三方库】nuitka---python源码打包工具

一、背景

在这里插入图片描述
其中,pyinstaller打包教程 可阅读此blog

二、参考链接

  1. 官方教程
  2. 知乎nuitka打包系列教程
  3. nuitka打包exe流程blog
  4. nuitka打包入门
  5. 打包过程常见问题记录

三、部分编译选项释义

在这里插入图片描述
在这里插入图片描述

四、打包流程

1. 下载mingw64(注意版本,下载地址

在这里插入图片描述

2. 安装nuitka

在这里插入图片描述

3. 编写运行脚本或直接执行编译指令

.bat脚本如下:

@echo off

call nuitka --mingw64 --standalone --show-progress --remove-output ^
--windows-icon-from-ico=.\blur.ico ^
--plugin-enable=torch,numpy,multiprocessing ^
--nofollow-imports ^
--include-plugin-directory=xxx,yyy,zzz,xxx\111,yyy\222 ^ 自己要编进去的库
--output-dir=nuitka_dist ^
main.py

pause

五、问题记录

在这里插入图片描述
在这里插入图片描述

;