Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/oop/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在Push命令的清单中缺少IBM Bluemix/依赖项上的Python应用程序_Python_Ibm Cloud - Fatal编程技术网

在Push命令的清单中缺少IBM Bluemix/依赖项上的Python应用程序

在Push命令的清单中缺少IBM Bluemix/依赖项上的Python应用程序,python,ibm-cloud,Python,Ibm Cloud,如何修改清单以使用默认构建包(2.7.11)支持的最新2.7 Python版本,并将我的应用程序推送到Bluemix托管服务器中?为什么它要处理旧版本2.7.6 我的命令是: cf push myapp-m128-c“python server.py” 请参见下面的结果错误: C:\Python\myprojects\ABC>cf push myapp -m 128M -c "python server.py" -----> Downloaded app package (6.2M

如何修改清单以使用默认构建包(2.7.11)支持的最新2.7 Python版本,并将我的应用程序推送到Bluemix托管服务器中?为什么它要处理旧版本2.7.6

我的命令是:

cf push myapp-m128-c“python server.py”

请参见下面的结果错误:

C:\Python\myprojects\ABC>cf push myapp -m 128M -c "python server.py"

-----> Downloaded app package (6.2M)
    -------> Buildpack version 1.5.5
 !     Warning: Your application is missing a Procfile. This file tells Heroku how to run your application.
 !     Learn more: https://devcenter.heroku.com/articles/procfile
-----> Installing python-2.7.6
DEPENDENCY MISSING IN MANIFEST: python 2.7.6
It looks like you're trying to use python 2.7.6.
Unfortunately, that version of python is not supported by this buildpack.
The versions of python supported in this buildpack are:
- 3.5.1
- 3.5.0
- 3.4.4
- 3.4.3
- 3.3.6
- 3.3.5
- 2.7.11
- 2.7.10
If you need further help, start by reading: http://github.com/cloudfoundry/python-buildpack/releases.
Staging failed: Buildpack compilation step failed

python3也有类似的问题,从文档中可以看出,你没有在清单文件中处理这个问题,而是在你应用程序根目录下的runtime.txt中,它只包含
python-3.5.1
,所以它必须是
python-2.7.11

没错,buildpack使用runtime.txt指定应该安装哪个python版本,并且,只有当buildpack支持该文件中指定的版本时,它才会工作。或者,您可以省略runtime.txt以始终使用buildpack的默认版本(目前在1.5.12 buildpack版本中为2.7.12)。感谢您的快速支持。更新runtime.txt文件解决了该问题。