本文介绍了Bluemix:如何升级点子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在bluemix上运行python应用程序时收到此警告:

I got this warning when I run my python app on bluemix:

You are using pip version 7.1.0, however version 8.1.0 is available.

如何在cf应用程序中运行诸如"pip install --upgrade pip"之类的shell命令?

How do I run shell commands like "pip install --upgrade pip" in my cf app?

在构建"或部署"阶段添加"Shell脚本"步骤给了我pip not found错误.

Adding "Shell script" step on Build or Deploy stage gave me pip not found error.

谢谢!

推荐答案

在暂存应用程序时(即使用pip时),您将无法运行任意命令.

You can't run arbitrary commands while the application is being staged, i.e. when pip would be used.

如果您不能忽略该警告,则可以尝试使用在推送您的应用程序时通过使用-b选项更新为使用8.1.0 ,但我无法评论它们之间的不同之处.

If you can't ignore the warning, you could try the Heroku Python buildpack which is updated to use 8.1.0 by using the -b option when pushing your app, but I can't comment on how they are otherwise different.

cf push appname -b https://github.com/heroku/heroku-buildpack -python.git

cf push appname -b https://github.com/heroku/heroku-buildpack-python.git

更新:另一种方法是创建自己的buildpack并更新manifest.yml以使用此buildpack(最好是通过类似的buildpack(如果存在)进行构建). 本文显示了如何创建构建包.

Update: Another way is by creating your own buildpack and update manifest.yml to use this buildpack (preferably by building it up from similar buildpack if it exists). This article shows how to create a buildpack.

这篇关于Bluemix:如何升级点子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-13 13:19