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 Resposta
1
Resposta aceita

Hi,

the issue could be due to many reasons:

Hope it helps ;)

profile picture
ESPECIALISTA
respondido há um ano
  • 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"

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas