简体   繁体   English

带有moviepy和numpy的AWS Lambda发生错误

[英]Error on AWS Lambda with moviepy and numpy

I've been trying to package my python app for lambda that uses moviepy but I keep getting this error: 我一直在尝试为使用moviepy的lambda打包我的python应用程序,但我不断收到此错误:

Original error was: No module named 'numpy.core._multiarray_umath'

I've been trying different ways to package my python 3.7 app for lambda but I haven't figured anything out. 我一直在尝试以不同的方式将我的python 3.7应用程序打包为lambda,但我还没有发现任何问题。 Is there some way to resolve this or maybe some other python library that can concatenate and resize videos that doesn't use numpy? 是否有某种方法可以解决此问题,或者是否有其他一些python库可以连接并调整不使用numpy的视频的大小?

Thanks! 谢谢!

From error as per in question lambda you are executing is not having module of numpy and moviepy. 根据正在执行的问题lambda,由于错误而没有numpy和moviepy模块。 you have forget to add modules in lambda. 您忘了在lambda中添加模块。 add dependency first and run it will work. 首先添加依赖项并运行它将起作用。

you can also zip you modles and upload it to lambda from console. 您也可以压缩模型并从控制台将其上传到lambda。

The issue and resolution are described here : 问题和解决方法在这里描述:

"ModuleNotFoundError" and "Module cannot be loaded" are common errors for Lambda functions in Python. 对于Python中的Lambda函数,“ ModuleNotFoundError”和“无法加载模块”是常见错误。 These errors are usually due to incorrect folder structure or file permissions with the deployment package .zip file. 这些错误通常是由于文件夹结构不正确或部署包.zip文件具有文件许可权所致。

For additional packages, have you looked at moviepy . 对于其他软件包,您是否看过moviepy Mind you, changing package doesn't resolve your issue. 请注意,更改包装不能解决您的问题。 You need to include the package modules in the lambda zip by following the instructions above. 您需要按照上述说明在lambda zip中包含软件包模块。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM