将python应用程序推送到bluemix时出错

2024-04-26 22:53:54 发布

您现在位置:Python中文网/ 问答频道 /正文

当我从本地app dir尝试cf push时,我得到以下错误,似乎与python buildpack有关。 错误:

`2016-03-31T21:08:07.00-0400 [STG/185] OUT -----> Downloaded app package (6.7M)
2016-03-31T21:08:07.98-0400 [STG/0] OUT -------> Buildpack version 1.5.1
2016-03-31T21:08:09.86-0400 [STG/0] OUT -----> Installing runtime (requests
2016-03-31T21:08:09.86-0400 [STG/0] OUT python-2.7.9)
2016-03-31T21:08:10.32-0400 [STG/0] OUT ! Resource https://lang-python.s3.amazonaws.com/cedar/runtimes/requests
2016-03-31T21:08:10.32-0400 [STG/0] OUT python-2.7.9.tar.gz is not provided by this buildpack. Please upgrade your buildpack to receive the latest resources.
2016-03-31T21:08:10.33-0400 [STG/0] OUT Staging failed: Buildpack compilation step failed
2016-03-31T21:08:10.33-0400 [STG/0] ERR
2016-03-31T21:08:12.29-0400 [API/3] ERR encountered error: App staging failed in the buildpack compile phase`

这是我的清单.yml地址:

applications:
- services:
  - dialog-pizza
  - nlc_weather
  - Retrieve and Rank-p4
  path: .
  memory: 128M
  instances: 1
  domain: mybluemix.net
  name: jklab
  host: jklab
  disk_quota: 1024M
  buildpack: python_buildpack

这是我的运行时.txt你知道吗

requests
python-2.7.9

Tags: theapp错误diroutrequestspushcf
1条回答
网友
1楼 · 发布于 2024-04-26 22:53:54

您的runtime.txt文件应该只有您想要使用的python版本,您需要从中删除requests字:

python-2.7.9

您遇到的错误是因为buildpack试图查找名为requests python-2.7.9的python版本,但该版本不存在。你知道吗

相关问题 更多 >