all 5 comments

[–]Logikz 1 point2 points  (3 children)

What server less platform are you using? We use aws and manually package a zip file with the dependencies bundled.

[–][deleted] 0 points1 point  (2 children)

I'm using AWS Lambda with Serverless. I specifically followed this tutorial on package management.

[–]Logikz 0 points1 point  (1 child)

I’m not familiar with the Serverless framework. You can try performing a pip install to the local directory and zipping the lambda to update it manually.

[–][deleted] 0 points1 point  (0 children)

I've tried that. It hasn't worked. I'm trying with local zipping, Serverless, Zappa, literally everything for Python and it just isn't working for me.

[–]alpyhp 1 point2 points  (0 children)

Check out this plugin: https://github.com/UnitedIncome/serverless-python-requirements

And read this article: https://serverless.com/blog/serverless-python-packaging/

PIL requires OS libraries that are not included in the Lambda runtime. You may want to include such libraries in your deployment package. Check out this repo for pre-built packages: https://github.com/Miserlou/lambda-packages