1

So I made a super simple program with 1 import (it being pysimplegui) and when i compile it the size is 9 mb? The py file is just 1 kb...

Is there a way to make it be less than 8 mb atleast?

Here is my code:

import PySimpleGUI as sg

layout = [[sg.Text('Test app')]]

window = sg.Window('test app', layout, finalize=True)

while True:
    event, values = window.read()

    if event == sg.WIN_CLOSED:
        break

window.close()
Abhyuday Vaish
  • 2,357
  • 5
  • 11
  • 27
  • Does this answer your question? [Reducing size of pyinstaller exe](https://stackoverflow.com/questions/47692213/reducing-size-of-pyinstaller-exe) – Leo Mar 27 '22 at 08:42
  • No, it didn't help me a lot since the only package I was importing was pysimplegui. – CodeSearcher Mar 27 '22 at 23:29

1 Answers1

0

Cause pyinstaller include a copy of your current python core and additional modules (searching recursively for imports in your files and modules) to your build. Python core .dll has size about 3.5Mb, for example.