Github Actions with Python3.9 and the Serverless Framework error on package/deploy

Run serverless/github-action@v3.1
  with:
    args: -c "cd ./serverless && serverless package --stage dev"
    entrypoint: /bin/sh
  env:
    NODE_VERSION: 16.x
    pythonLocation: /opt/hostedtoolcache/Python/3.9.14/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.9.14/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.14/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.14/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.9.14/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.9.14/x64/lib
    AWS_DEFAULT_REGION: ***
    AWS_REGION: ***
    AWS_ACCESS_KEY_ID: ***
    AWS_SECRET_ACCESS_KEY: ***
    AWS_SESSION_TOKEN: ***

Error:

Running "serverless" from node_modules

Packaging aqua-data-ml-sls for stage dev (***)
Environment: linux, node 16.17.1, framework 3.22.0 (local) 3.23.0v (global), plugin 6.2.2, SDK 4.3.2
Error:
Docs:        docs.serverless.com
Error: `python3.9 -m pip help install` Exited with code 1
    at ChildProcess.<anonymous> (/github/workspace/serverless/node_modules/child-process-ext/spawn.js:38:8)
    at ChildProcess.emit (node:events:513:28)
Support:     forum.serverless.com
Bugs:        github.com/serverless/serverless/issues


1 deprecation found: run 'serverless doctor' for more details
    at ChildProcess.emit (node:domain:489:12)
    at maybeClose (node:internal/child_process:1093:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)

Any idea what the issue could be?

Hi, did you manage to find a solution? Have a very similar issue.

Hi,

No, I ended up moving to using docker images (instead of zipping the packages) and just using the console commands instead of serverless/github-action.
It’s working beautifully…

Please let me know if you need help with this and I can share my code…

Hi @ronifintech1 which image di d you use? I have the same problem. Well I have many problems, first of all the size of the unzipped. Then the python modules not recognized.
So could you help me? Thank you