AWS Lambda pinecone-client package "No module named 'numpy.core._multiarray_umath'" error

139 Views Asked by At

Experiencing "No module named 'numpy.core._multiarray_umath'" importing pinecone-client python package in AWS Lambda python 3.11 runtime. I'm created the lambda layer on AWS Cloud-9 AWS Linux environment with pinecone-client 2.2.4 version and numpy1.24.4 version automatically installed as dependency.

Following are the error text

[ERROR] Runtime.ImportModuleError: Unable to import module 'app': 

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.11 from "/var/lang/bin/python3.11"
  * The NumPy version is: "1.24.4"

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'
  1. I have reinstalled both the setuptools package and numpy package as per previous issues. The error is not resolved and the error message remains unchanged.
  2. I have also verified the environment and runtime match the lambda environment. The outcome is positive.
1

There are 1 best solutions below

0
On

Check if there are multiple versions of Python in your environment, and make sure to install the module with the corresponding pip.