【发布时间】:2021-06-23 07:28:03
【问题描述】:
我对我的 aws lambda 上的 tesseract 有疑问。 tesseract 在本地工作,但当我在 lambda 中运行等效代码时却没有。 lambda 适用于 python 3.7,tesseract 为 0.3.7 (arn : arn:aws:lambda:eu-west-3:770693421928:layer:Klayers-python38-pytesseract:17)。
我已经安装了 tesseract 和枕头层。
text = pytesseract.image_to_string(Image.open('hello_world.png'), config=custom_config)
这是我得到的错误:
{
"errorMessage": "Unable to import module 'lambda_function': No module named 'Image'",
"errorType": "Runtime.ImportModuleError",
"stackTrace": []
}
非常感谢您的帮助!
【问题讨论】:
标签: python amazon-web-services aws-lambda tesseract