AWS Numpy Runtime.ImportModuleError: Unable to import module 'lambda_function': Unable to import required dependencies: numpy:

0

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy C-extensions failed. This error can happen for many reasons, often due to issues with your setup or how NumPy was installed.

We have compiled some common reasons and troubleshooting tips at:

https://numpy.org/devdocs/user/troubleshooting-importerror.html

Please note and check the following:

  • The Python version is: Python3.9 from "/var/lang/bin/python3.9"
  • The NumPy version is: "1.24.2"

and make sure that they are the versions you expect. Please carefully study the documentation linked above for further help.

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

AND What does this defines The Python version is: Python3.9 from "/var/lang/bin/python3.9"

1개 답변
1
수락된 답변

Hi,

the issue could be due to many reasons:

Hope it helps ;)

profile picture
전문가
답변함 일 년 전
  • How can I create a layer to invoke my lambda function. Means where I have to write --- pass a list of dependencies included with the layer metadata.

    { "dependencies": { "requests": "latest", "numpy": "== 1.20.1", "keyring": ">= 4.1.1" }, "layer": { "name": "a-sample-python-lambda-layer", "description": "this layer contains requests, numpy and keyring libraries", "compatible-runtimes": ["python3.6","python3.7","python3.8"], "license-info": "MIT" } }

    You can create a layer to invoke your Lambda function and pass a list of dependencies included with the layer metadata.

    The following example creates Python Lambda layers containing requests (latest version), numpy (version 1.20.1), and keyring (version >= 4.1.1) libraries. You can invoke the Lambda function with a payload similar to the following:

    AND What does this defines The Python version is: Python3.9 from "/var/lang/bin/python3.9"

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠