Hi, I am trying to use the framework together with GCP and Python for the first time. I like poetry and would like to use it in this project. I followed the sample application and some blog post about using poetry with serverless.
When I try
sls deploy I am hitting the following error. Note that I went to
python38 as runtime.
Error: python38 not found! Try the pythonBin option.
at pipAcceptsSystem (/Users/username/dev/cloudfunctions/node_modules/serverless-python-requirements/lib/pip.js:104:13)
This error stems from the
serverless-python-requirements plugin. Ideally, the
python binary as well as
pip should be controlled by
poetry - and not be the system python. Am I missing something in my setup? Here is my
service: cloudfunctions provider: name: google stage: dev runtime: python38 project: notShown frameworkVersion: '2' plugins: - serverless-google-cloudfunctions - serverless-python-requirements package: exclude: - node_modules/** - .gitignore - .git/** functions: first: handler: http events: - http: path
[tool.poetry] name = "cloudfunctions" version = "0.1.0" description = "" authors = ["..."] [tool.poetry.dependencies] python = "^3.8" [tool.poetry.dev-dependencies] [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api"