For installing python packages, is there a way to only install the specific modules I need (plus dependencies) into the virtual environment?
For example, I import the following in my code
from statsmodels.tsa.arima_model import ARIMA
I only need ARIMA (and dependencies), and won't need the complete statsmodels library.
How do I accomplish that?
Rationale:
- I am trying to zip up the packages and deploy to AWS lambda. However, I am exceeding the 50MB file size limit.
- If there is a way to install only the modules I need from the packages, I can reduce the file size.