0

I have been using pyinstaller as my method of turning a python file into an executable. However, the executable's size is over 6mb for even a small application such as printing "hello world"

I did some research and found out that there was a program called nuitka that compiles the file down to language C and does some optimizing. However, it turns out that nuitka still needs libpython and is therefore creates executables of large sizes.

So is there any program or compiler that can turn a python file into a lightweight executable?

Andy_ye
  • 560
  • 1
  • 7
  • 19
  • What is your actual goal? Why do you need a tiny executable and you are not satisfied with the options you already have? – koalo Aug 30 '20 at 15:32
  • My goal is to distribute some exe files that I made to others, and it's not so helpful when a executable that just imports requests and calls a website weighs more than 40mb. Also, when I create a program that has to run on the background, it takes waaaay to much cpu power. (And it takes longer to start the program up then running a normal python file too, but I'm not sure if this is another problem) – Andy_ye Aug 30 '20 at 15:39
  • Maybe you should reconsider the choice of your programming language if you have such tight requirements. – koalo Aug 30 '20 at 15:44
  • And take months learning that language? No thanks. – Andy_ye Aug 30 '20 at 15:45
  • Have you tried cython or jython? – snookso Aug 30 '20 at 16:22

0 Answers0