serverless / serverless-python-requirements

βš‘οΈπŸπŸ“¦ Serverless plugin to bundle Python packages
MIT License
1.09k stars 289 forks source link

spawn python3.11 ENOENT when set runtime to ython3.11 #811

Closed biztrology-kd closed 4 months ago

biztrology-kd commented 6 months ago

Are you certain it's a bug?

Are you using the latest plugin release?

Is there an existing issue for this?

Issue description

Error: spawn python3.11 ENOENT at ChildProcess._handle.onexit (node:internal/child_process:284:19) at onErrorNT (node:internal/child_process:477:16) at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Service configuration (serverless.yml) content

provider:
  name: aws
  runtime: python3.11
  stage: dev
  region: us-west-2
custom:
  pythonRequirements:
   zip: true

Command name and used flags

sls deploy -s staging

Command output

Environment: darwin, node 18.18.2, framework 3.38.0 (local) 3.36.0v (global), plugin 7.2.0, SDK 4.5.1
Credentials: Local, "default-staging" profile
Docs:        docs.serverless.com
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues

Error:
Error: spawn python3.11 ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:284:19)
    at onErrorNT (node:internal/child_process:477:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Environment information

Framework Core: 3.38.0 (local) 3.36.0 (global)
Plugin: 7.2.0
SDK: 4.5.1
pgrzesik commented 6 months ago

Hello πŸ‘‹

It looks like you might not have python3.11 available in your system's PATH. Do you have it installed?

ramonpaolo commented 5 months ago

Thankss @pgrzesik

This is the solution!

biztrology-kd commented 5 months ago

@pgrzesik no, i have installed python3.11 in my mac, i run in aws ec2 have same issue, when i recreate a ec2 restore my mac that working, confused for me

ramonpaolo commented 5 months ago

@pgrzesik no, i have installed python3.11 in my mac, i run in aws ec2 have same issue, when i recreate a ec2 restore my mac that working, confused for me

You is running serverless deploy on your EC2 instance?

If yes, you need install python 3.11 in your instance!

pgrzesik commented 4 months ago

This looks to be the problem with missing python3.11 on your machine. I'm closing it as it does not seem to be a bug with plugin, but feel free to report back if you feel it should be reopened πŸ™‡