N.B.: Please do not lock/delete this question as I did not find any relevant answer.
I need to convert a .py
file to .exe
. I have tried pyinstaller
, py2exe
, and auto_py_to_exe
. Unfortunately, the output files are very big. For example, if I simply convert a python file to print('Hello world!')
, the output folder becomes 22 MB. The command of --exclude-module
does not reduce so much.
If I write the same code in C
and compiled by Dev-C++
, the file size will be below 1 MB.
So, is there any way to convert the .py
file to a .exe
file with a smaller file size?