Amazon Web Services(AWS)Lambda是否支持所有Python库? [英] Does Amazon Web Services (AWS) Lambda support all Python libraries?
问题描述
例如,我想使用scikit-learn进行机器学习,并使用pandas,numpy和matplotlib/seaborn进行数据分析. AWS Lambda是否支持所有这些库?有支持的库列表吗?还是应该创建一个虚拟服务器,以确保可以使用我想要的任何Python库?
For example, I would like to use scikit-learn for machine learning, and pandas, numpy, and matplotlib/seaborn for data analysis. Does AWS Lambda support all these libraries? Is there a list of libraries supported? Or should I create a virtual server instead, to ensure I can use any Python library I want?
推荐答案
默认情况下,这些模块不可用.我发现了这个(较旧的)可用模块列表,以及可以生成当前可用状态报告的代码,如果您希望这样做的话:
Those modules are not available by default. I found this (older) list of available modules, along with code to generate a current report of what is available, should you wish to do so:
https://gist.github.com/sjehutch/36493ff674b1b9a16fc44a5fc270760c
您可以使用virtualenv构建自己的环境,并将其上传到Lambda.它可以包含您想要的任何内容.有关更多信息,请参见此处:
You can build your own environment using a virtualenv and upload that to Lambda. It can contain anything you want. See here for more info:
https ://docs.aws.amazon.com/lambda/latest/dg/lambda-python-how-to-create-deployment-package.html
因此您仍然可以使用AWS Lambda,并且不需要虚拟服务器.
So you can still use AWS Lambda, and should not require a virtual server.
已编辑以添加一些自我宣传:
Edited to add a bit of self promotion:
我制作了一个网站,该网站显示了Amazon提供的每个环境中可用的当前模块.
这篇关于Amazon Web Services(AWS)Lambda是否支持所有Python库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!