Size of .exe bigger and bigger

43 views
Skip to first unread message

Felipe Morrison

unread,
Aug 23, 2023, 9:24:27 AM8/23/23
to PyInstaller
Hello, I'm using python 3.9.16, first time i made an .exe it was aprox 400mb of size then added 3 lines of code and it went to 800mb aprox. Then did the same process (add more lines and made .exe again since its a code i keep changing and adding stuff). The problem right now is the .pkg at build folder size is more than 5gb and i think is oversize and cant even make the .exe now.  ¿What could be the problem? 
Thanks in advance for any ideas.

I make the .exe in windows at cmd with this:

python -m PyInstaller main.spec

Also here are the imported packages:

import time
from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
import datetime
from kivy.properties import StringProperty
from kivy.uix.widget import Widget
from kivymd.app import MDApp
from kivy.clock import Clock
from kivymd.uix.list import MDList, OneLineListItem
from kivymd.theming import ThemeManager
from kivy.garden.matplotlib import FigureCanvasKivyAgg
from kivymd.uix.button import MDRaisedButton
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.screenmanager import Screen, ScreenManager
from kivymd.uix.datatables import MDDataTable
from kivymd.uix.boxlayout import MDBoxLayout
from kivymd.uix.button import MDRoundFlatButton, MDRectangleFlatButton
from kivymd.uix.textfield import MDTextField
from kivymd.uix.card import MDCard
from kivymd.uix.label import MDLabel
from kivy.uix.image import Image
from kivy.uix.gridlayout import GridLayout
from kivymd.uix.button import MDFillRoundFlatButton
from kivymd.uix.gridlayout import MDGridLayout
from kivy.uix.button import Button
import matplotlib.pyplot as plt
from matplotlib import pyplot as plt, dates
import random
from kivy.metrics import dp
from kivy.core.window import Window
import numpy as np
from class_spectrometer import Spectrometer
from class_calculus import Calculus
import threading
import pandas as pd
import csv
import os
import cProfile
import pstats
from tkinter import filedialog
from tkinter import Tk
from kivy.config import Config
import pickle
from kivy.core.window import Window

bwoodsend

unread,
Aug 24, 2023, 2:21:23 AM8/24/23
to PyInstaller
You're the only one in a position to answer that question. Look inside your application. What files are taking up the most space? Are there any there that shouldn't be?

Steve Barnes

unread,
Aug 25, 2023, 12:49:19 AM8/25/23
to pyins...@googlegroups.com

Hi Filipe,

 

As an educated guess I would think that your build process does not include deleting the previous build and that pyInstaller is incrementally adding all of the things that it thinks you need. Also, given the large size of the exe I would guess that you are either using Anaconda rather than an install from python.org or that you are building with your default python environment rather than a virtual environment containing just the packages that you need.

 

Is that any help?

 

Steve

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyinstaller...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/d4cba542-d8da-4e67-b94a-7ec3d46fa0c5n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages