Too large .exe file when using pyinstaller

I was looking a bit for this problem when people complained about an executable file size of 30 MB ~ 100 MB, but for some reason my 300 MB. Maybe I'm wrong, but I do not think this is normal. I tried using other alternatives like cx_Freeze, but I get the same result. Here mine 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 includes:

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 file:

pyinstaller --onefile --windowed montecarlo.py

thanks for the help

+6
source share
1 answer

This is normal since the packages you import have some large transitive dependencies.

, , pyinstaller, , pyinstaller . , , , , .

0

All Articles