You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched existing issues, it hasn't been reported yet
Issue description
I have a serverless config with functions that have multiple python versions (python3.7 and python3.8)
However, serverless-python-requirements is packaging python3.8 version of the packages for the python3.7 function. This is causing exceptions when the function is deployed to aws lambda:
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.
...
Original error was: No module named 'numpy.core._multiarray_umath'
(The python 3.8 version of numpy cannot be run by python 3.7)
When I separate the python3.7 functions and python3.8 functions into separate serverless files the problem goes away (but, that isn't very maintainable)
The issue seems to be cause by a single options.pythonBin shared between all functions
Are you certain it's a bug?
Are you using the latest plugin release?
Is there an existing issue for this?
Issue description
I have a serverless config with functions that have multiple python versions (python3.7 and python3.8)
However,
serverless-python-requirements
is packaging python3.8 version of the packages for the python3.7 function. This is causing exceptions when the function is deployed to aws lambda:(The python 3.8 version of numpy cannot be run by python 3.7)
When I separate the python3.7 functions and python3.8 functions into separate serverless files the problem goes away (but, that isn't very maintainable)
The issue seems to be cause by a single
options.pythonBin
shared between all functionsserverless-python-requirements/lib/pip.js
Line 149 in e8b2e51
(This would be fixed if each function had it's own
pythonBin
)Service configuration (serverless.yml) content
Command name and used flags
serverless package (or serverless deploy)
Command output
Environment information
The text was updated successfully, but these errors were encountered: