I have a python application that is roughly 500Mb when fully built with pyinstaller. I have narrowed down one of the guilty culprits to scipy which is a whopping 100Mb on disk.
Throughout my application I use scipy twice:
import scipy.integrate as it
...
res = it.cumtrapz(y=y, x=x)
AND
from scipy import stats
...
data = data[(np.abs(stats.zscore(data[columns])) < 5).all(axis=1)]
What is the best method on reducing the size of a package for a pyinstaller application? Is it:
- Manually go through the scipy package of the built application and delete folders and files that aren't required?
- Rebuild
scipyfrom source with only the required files? pip installa smaller version of scipy, if one exists?- None of the above
I would like to reduce the size of the scipy package rather than implement zscore and cumtrapz myself.