且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Mac上安装numpy以在AWS Lambda上运行

更新时间:2023-11-11 12:57:40

基于@MarkB的注释,无法在Mac上构建numpy以便在AWS Lambda上使用.那么,为什么有些软件包可以工作而有些却不能呢?

Building on @MarkB's comment, it would not be possible to build numpy on a Mac to use on AWS Lambda. So why do some packages work and others don't?

Python扩展模块,如Mark Nunnikhoven的博客所述在这里,是

Python extension modules, as explained on Mark Nunnikhoven's blog here, are

用C或C ++编写的

可以扩展python或调用C或C ++ 库.

written in C or C++ that can either extend python or call C or C++ libraries.

由于这些模块是针对您所使用的系统编译的,并且AWS Lambda是Linux环境,因此您需要在Linux环境中安装所有扩展模块.

Since these modules are compiled specific to the system you're on, and AWS Lambda is a Linux environment, you'll need to install any extension modules on a Linux environment.