将Conda Python环境部署到AWS Lambda Layer遇Numpy问题求助
Conda环境打包为AWS Lambda Layer的Numpy报错问题求助
我正尝试将Conda管理的Python环境打包为AWS Lambda Layer,供Lambda函数调用。目前用预编译的Pandas/Numpy Pip包部署Layer可正常运行,但用Conda打包环境时出现问题。我倾向于用Conda做版本管理与兼容性校验,不想为AWS额外混用Pip环境。
打包后运行时Numpy出现以下报错:
Error importing numpy: you should not try to import numpy from its source directory; please exit the numpy source tree, and relaunch UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package
我了解Conda包是预编译版本,而AWS Lambda Layer要求包在AWS机器上编译,这可能是问题根源,但Redis等其他包用Conda打包后可正常运行。恳请有相关经验的人提供解决方案,谢谢!
操作步骤:压缩Conda环境并上传至AWS Lambda Layer
内容的提问来源于stack exchange,提问作者Simon
相关产品推荐
相关产品推荐

