Is it possible to only install part of a python package such as scipy to reduce the total size. The latest version (0.19.0) appears to be using 174MB, I'm only using it for its spectrogram feature. I'm putting this on AWS Lambda and I'm over the 512MB storage limit.
I realize there are other options I could take, e.g. using another spectrogram implementation, manually removing scipy files, etc. I'm wondering if there is any automated way to do this?
There is no supported way of doing it. You may try removing manually some parts which you do not use. However, you're on your own if you go down this route.
modular scipy install to fit on space constrained environment