如何解决找不到Bitbucket Pipleline python3.7!尝试pythonBin选项
我在Bitbucket管道下面
image: node:11.13.0-alpine
pipelines:
branches:
master:
- step:
caches:
- node
script:
- apk add python py-pip python3
- npm install -g serverless
- serverless config credentials --stage dev --provider aws --key $AWS_ACCESS_KEY_ID --secret $AWS_SECRET_ACCESS_KEY
- cd src/rsc_user
- pip install -r requirements.txt
- sls plugin install -n serverless-python-requirements
- sls plugin install -n serverless-wsgi
- npm i serverless-package-external --save-dev
- npm install serverless-domain-manager --save-dev
- serverless deploy --stage dev
投掷错误
Error -------------------------------------------------- Error: python3.7 not found! Try the pythonBin option. at pipAcceptsSystem (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/serverless-python-requirements/lib/pip.js:100:13) at installRequirements (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/serverless-python-requirements/lib/pip.js:173:9) at installRequirementsIfNeeded (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/serverless-python-requirements/lib/pip.js:556:3) at ServerlessPythonRequirements.installAllRequirements (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/serverless-python-requirements/lib/pip.js:635:29) at ServerlessPythonRequirements.tryCatcher (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromise0 (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/promise.js:649:10) at Promise._settlePromises (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/promise.js:729:18) at _drainQueueStep (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/async.js:93:12) at _drainQueue (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/async.js:102:5) at Immediate.Async.drainQueues [as _onImmediate] (/opt/atlassian/pipelines/agent/build/src/rsc_user/node_modules/bluebird/js/release/async.js:15:14) at processImmediate (internal/timers.js:443:21) at process.topLevelDomainCallback (domain.js:136:23) 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: 11.13.0 Framework Version: 2.1.1 Plugin Version: 4.0.4 SDK Version: 2.3.2 Components Version: 3.1.4
由于我是python的新手,所以我无法收到此错误。 任何帮助,高度赞赏
谢谢
解决方法
此错误基本上意味着您没有python的 right 安装。某些应用程序需要python3.7,并且您未使用apk add python3
指定版本。因此,可能已安装了最新版本(3.8)。
此article处理如何为位桶管道中的代理选择给定的python版本。基本上可以归结为:
image: python:3.7
pipelines:
default:
- step:
script:
- python --version
您有使用Alpine的理由吗?否则我会选择上面的实用图像。
,他解决
pythonRequirements:
pythonBin: python3
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。