I've searched a little bit about this problem where people complained about the executable file size being 30mb ~ 100mb, but for some reason mine is 300mb. I may be wrong, but I don't think this is normal. I tried using other alternatives like cx_Freeze, but I get the same result. Here's my includes in my project :
from PyQt5 import QtCore, QtGui, QtWidgets
from pyplot import functions as plot
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
window = QtWidgets.QDialog()
ui = Ui_Dialog()
ui.setupUi(window)
window.show()
sys.exit(app.exec_())
pyplot is another python file for my project which include :
from numpy import power, cbrt, sin, cos, arange
from matplotlib import pyplot as plt
from matplotlib import patches as pts
from scipy import integrate as intg
I use this command to create my executable :
pyinstaller --onefile --windowed montecarlo.py
Thanks for helping
This is normal, as the packages you import have some large transitive dependencies.
To quantify each package's contribution, simply comment out all the imports, run pyinstaller, then add them back one by one, noting the size of pyinstaller's output after each one. You probably won't find an action item in the stats, though, since your app needs each of those imports anyway.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With