How to install/import dependencies and execute a Python file in Bluemix

我怕爱的太早我们不能终老 提交于 2019-12-11 04:54:56

问题


I am working with IBM bluemix for the first time, and have following questions::

1) When we are writing a python program in python GUI our local desktop, we always install desired libraries through pip, and import them in our code. But how to do that in Bluemix?

import-from-python-library-on-bluemix is similar to my query, but I fail to understand the process.

2) How to execute the .py file on Bluemix?


回答1:


To run an app in Bluemix you need to add a few files to the source you push :

  • requirements.txt : the python dependencies (it's not Bluemix specific, you should always have one anyway but it's required here)
  • Procfile : contains the command to start your app
  • manifest.yml : describes the infrastructure/environment of the app
  • (optional) runtime.txt : to precise the python version to use, if omitted it uses the buildpack default


来源:https://stackoverflow.com/questions/43805382/how-to-install-import-dependencies-and-execute-a-python-file-in-bluemix

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!