I've been successfully able to install python modules in my python lambda function using subprocess
, a virtual environment, and pip
calls. However, this only works if they don't have C dependencies, like with numpy
or pandas
(the subprocess.check_output()
call only says it fails with exit status 1).
It appears that the lambda servers don't have gcc
installed, and there's no apt-get
to install or sudo
, chroot
or similar command to let give permission. It does have install
so I may be able to install it locally if I can find a standalone gcc
package, but since I don't have root access or chroot
I suspect that won't work.
At this point I don't care about the right way to do this since it seems like Amazon doesn't want me to be doing this, any workaround to get C-dependent python modules to install would be fantastic.