使用cython将py文件编译为exe

首先,使用embed参数生成文件main.c

cython main.py --embed -3

然后编译它:

call "C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\VsDevCmd.bat" -arch=x64 -host_arch=x64

cl main.c /I C:\Python39\include /link C:\Python39\libs\python39.lib

然后检查依赖 sshot-1