Python start命令在Bluemix中应该是什么样子? [英] What should the Python start command look like in Bluemix?

查看:72
本文介绍了Python start命令在Bluemix中应该是什么样子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将python3应用程序推送到Bluemix,但是收到错误消息msg缺少启动命令".我试图添加-c"python appname.py",就像Windows在Windows中通常添加的-c"python3 appname.py"像Linux在Python中一样,但是都不适合我.谁能给我正确的启动命令来使用?

I am trying to push a python3 app to Bluemix, but get the error msg "missing start command". I have tried to add -c "python appname.py" as Python usually has in Windows and -c "python3 appname.py" as in Python in Linux, but neither works for me. Can anyone give me the right start command to use?

推荐答案

您可以在名为Procfile的文件中定义启动命令.在您要推送到Bluemix的应用程序代码的根目录中创建Procfile. Procfile的内容应如下所示:

You can define the start command in a file called Procfile. Create the Procfile in the root of your app code that you push to Bluemix. The contents of the Procfile should look like this:

web: python3 appname.py

其中appname.py是要运行的python脚本的名称

这篇关于Python start命令在Bluemix中应该是什么样子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆