serverless-python-requirements icon indicating copy to clipboard operation
serverless-python-requirements copied to clipboard

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

Open bachgarash opened this issue 3 years ago • 0 comments

Hello. I am using the plugin to install pandas and numpy. But still get Original error was: No module named 'numpy.core._multiarray_umath' error

Device : MacOs x Monterey 12.3.1 Python runtime: 3.9

bakhtiyar@Bakhtiyars-MacBook-Pro one_com % serverless -v                                                                                            
Running "serverless" from node_modules
Framework Core: 3.3.0 (local) 3.0.1 (global)
Plugin: 6.1.0
SDK: 4.3.1

Would appreciate any help.

Note: I can fix the problem by manually building and updating .zip file as a layer. Please, don't recommend that way :)

Note 2: My config yaml file

plugins:
  - serverless-python-requirements
custom:
  pythonRequirements:
    fileName: ../requirements-serverless.txt
    dockerizePi: non-linux
    layer: true
    slim: true # otherwise slimPatterns will not work
    strip: false # avoid some ELF alignment issues
    slimPatternsAppendDefaults: false
    slimPatterns:
      - '**/*.py[c|o]'
      - '**/__pycache__*'

bachgarash avatar May 20 '22 11:05 bachgarash