无服务器:找不到 python3.7!尝试 pythonBin 选项 [英] Serverless: python3.7 not found! Try the pythonBin option
本文介绍了无服务器:找不到 python3.7!尝试 pythonBin 选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用无服务器框架和 Python 开发一个简单的无服务器应用程序.
I'm trying to develop a simple serverless app using Serverless framework and Python.
这是我的 serverless.yml
service: hello-world
provider:
name: aws
region: us-west-2
runtime: python3.7
environment:
DB_ENDPOINT:
DB_USERNAME:
DB_PASSWORD:
plugins:
- serverless-python-requirements
functions:
hello:
handler: handler.trial_registration
当我运行 sls deploy
时出现以下错误
When I run sls deploy
I get following error
Serverless: Generated requirements from /home/ganesh/code/hello-world/requirements.txt in /home/ganesh/code/hello-world/.serverless/requirements.txt...
Serverless: Installing requirements from /home/ganesh/.cache/serverless-python-requirements/5c625dc5f843b3bb1163fd11989b43fb3cbca4299219c6ef399108fb36e56a2f_slspyc/requirements.txt ...
Serverless: Using download cache directory /home/ganesh/.cache/serverless-python-requirements/downloadCacheslspyc
Error --------------------------------------------------
Error: python3.7 not found! Try the pythonBin option.
at pipAcceptsSystem (/home/ganesh/code/hello-world/node_modules/serverless-python-requirements/lib/pip.js:100:13)
at installRequirements (/home/ganesh/code/hello-world/node_modules/serverless-python-requirements/lib/pip.js:168:9)
at installRequirementsIfNeeded (/home/ganesh/code/hello-world/node_modules/serverless-python-requirements/lib/pip.js:532:3)
at ServerlessPythonRequirements.installAllRequirements (/home/ganesh/code/hello-world/node_modules/serverless-python-requirements/lib/pip.js:611:29)
at ServerlessPythonRequirements.tryCatcher (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/promise.js:517:31)
at Promise._settlePromise (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/promise.js:574:18)
at Promise._settlePromise0 (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/promise.js:619:10)
at Promise._settlePromises (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/promise.js:699:18)
at _drainQueueStep (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/async.js:138:12)
at _drainQueue (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/async.js:131:9)
at Async._drainQueues (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/async.js:147:5)
at Immediate.Async.drainQueues (/home/ganesh/code/hello-world/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:794:20)
at tryOnImmediate (timers.js:752:5)
at processImmediate [as _immediateCallback] (timers.js:729:5)
For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.
Get Support --------------------------------------------
Docs: docs.serverless.com
Bugs: github.com/serverless/serverless/issues
Issues: forum.serverless.com
Your Environment Information ---------------------------
Operating System: linux
Node Version: 8.10.0
Framework Version: 1.51.0
Plugin Version: 1.3.9
SDK Version: 2.1.0
我不确定我错过了什么.错误消息对我没有帮助.
I'm not sure what am I missing. The error message is not helpful to me.
推荐答案
AWS (Elastic Beanstalk) 尚未包含 python3.7 (31/08/2019),请尝试将您的 Python 版本降级到 3.6 并重试.
AWS (Elastic Beanstalk) didn't yet include python3.7 (31/08/2019), try to downgrade your python version to 3.6 and try again.
这篇关于无服务器:找不到 python3.7!尝试 pythonBin 选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文