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

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

Open oops-gh opened this issue 2 years ago • 5 comments

Are you certain it's a bug?

  • [X] Yes, it looks like a bug

Are you using the latest plugin release?

  • [X] Yes, I'm using the latest plugin release

Is there an existing issue for this?

  • [X] I have searched existing issues, it hasn't been reported yet

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

oops-gh avatar Dec 14 '23 10:12 oops-gh

Hello 👋

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

pgrzesik avatar Dec 17 '23 21:12 pgrzesik

Thankss @pgrzesik

This is the solution!

ramonpaolo avatar Feb 01 '24 23:02 ramonpaolo

@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

oops-gh avatar Feb 05 '24 03:02 oops-gh

@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!

ramonpaolo avatar Feb 05 '24 11:02 ramonpaolo

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 🙇

pgrzesik avatar Feb 25 '24 00:02 pgrzesik