0

I have to total of 8 python files and I converted it into exe using auto-py-to-exe module in Visual Studio code and the output exe file is about 80 MB. It is working fine in developer laptop with high end specification and opens in about 5 seconds.

But when I share the same exe to lower specification laptops, the startup of exe files take more than a minute.

Is there any method other than auto-py-to-exe to convert python to exe which works faster.

  • 3
    Have you already tried things (directly) like PyInstaller? cx_Freeze? https://stackoverflow.com/questions/41570359/how-can-i-convert-a-py-to-exe-for-python – OneCricketeer Sep 06 '21 at 14:55
  • A non-trivial amount of overhead is inevitable because of the need to install the python interpreter and relevant parts of the standard library. Ultimately, python to exe approaches can't compete with something like C or C++ for executable size. – John Coleman Sep 06 '21 at 15:01
  • 1
    Pyinstaller (and perhaps other py-to-exe tools) has a ‘one folder’ mode which doesn’t involve extracting so should be much quicker to start. Have you tried that? You could distribute the one folder content in a zip file and teh recipient extracts it to the folder it runs from. – DisappointedByUnaccountableMod Sep 06 '21 at 19:39
  • Indeed, extracting from the zip can be slow, especially if the file is on a slow network drive. Even when compiled (using FBS which produced smaller releases than cx_freeze in my case), what loaded in a few seconds from the local drive took about a minute from the network drive. – Lenormju Sep 08 '21 at 13:25

0 Answers0