keithrozario / Klayers

Python Packages as AWS Lambda Layers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Still Can't Import Pandas (importing numpy c-extensions failed) AWS Amplify

mcnamara-charles opened this issue · comments

So I'm working on an amplify project and I need Pandas for it. I tried initially just importing pandas which obviously didn't work. Now I've added your ARN but that yields the same result. Is there a special way for me to import?

{
"errorMessage": "Unable to import module 'index': Unable to import required dependencies:\nnumpy: \n\nIMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!\n\nImporting the numpy C-extensions failed. This error can happen for\nmany reasons, often due to issues with your setup or how NumPy was\ninstalled.\n\nWe have compiled some common reasons and troubleshooting tips at:\n\n https://numpy.org/devdocs/user/troubleshooting-importerror.html\n\nPlease note and check the following:\n\n * The Python version is: Python3.9 from "/var/lang/bin/python3.9"\n * The NumPy version is: "1.21.2"\n\nand make sure that they are the versions you expect.\nPlease carefully study the documentation linked above for further help.\n\nOriginal error was: No module named 'numpy.core._multiarray_umath'\n",
"errorType": "Runtime.ImportModuleError",
"requestId": "c254c607-93bc-4430-b9dd-940da8e5193c",
"stackTrace": []
}

The layer was build for version 3.8, looks like you're using Python3.9, unfortunately, it will not work.