0

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:

  1. Manually go through the scipy package of the built application and delete folders and files that aren't required?
  2. Rebuild scipy from source with only the required files?
  3. pip install a smaller version of scipy, if one exists?
  4. None of the above

I would like to reduce the size of the scipy package rather than implement zscore and cumtrapz myself.

RMRiver
  • 625
  • 1
  • 5
  • 14

0 Answers0