I have a simple pandas pyinstaller exe which is over 40MB.
My exe example:
import collections
import csv
import selenium
import pandas
print(\'hi\')
I use the Anaconda environment and so the virtualenv solution isn't an option. my way was to exclude unnecessary modules in my spec file, ex.:
in Analysis(...)
excludes=['pandas', 'numpy'],
(this are modules whose raise the size of the files extraordinarily)
For every build i'm using this adjusted spec file to create the exe.
pyinstaller "mySpec.spec" --distpath=""