Python start命令在Bluemix中应该是什么样子?

编程入门 行业动态 更新时间:2024-10-21 18:30:58
本文介绍了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中应该是什么样子?

本文发布于:2023-11-01 18:02:24,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1550024.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:是什么样子   中应   命令   Python   start

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!