问题
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