0

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.

nicolashahn
  • 539
  • 7
  • 19
  • `ubuntu` has `numpy` binaries in its repositories, so it can be installed without compiling. But the same lack of permissions may keep you from loading those. – hpaulj Jan 25 '16 at 19:55
  • Lambda does not run Ubuntu. Not sure how you got that idea. Lambda runs Amazon Linux, as is clearly documented here: http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html – Mark B Jan 25 '16 at 20:33

1 Answers1

0

Check this answer for another question on how to install numpy and pandas in Amazon Lambda.

Community
  • 1
  • 1
Attila Tanyi
  • 4,904
  • 5
  • 27
  • 34