Install pip or easy_install to install python packages on ubuntu
sudo apt-get install python-pip
sudo apt-get install python-setuptools
sudo easy_install virtualenv
pip install virtualenv
After installing virtaulenv isuue this command
you will get a folder named flask change directory to this folder
It contains a complete Python environment ready to be used for this project
Virtual environments can be activated and deactivated, if desired. An activated environment adds the location of its bin folder to the system path, so that for example, when you type python you get the environment’s version and not the system’s one.
Now install flask
flask/bin/pip install flask
Create a Heroku account and Install the Heroku tool belt
and inserting the basic “Hello World” code
from flask import Flask
app = Flask(__name__)
return 'Hello World!'
Test your Flask install by running this webserver:
You should see this in your terminal:
* Running on http://0.0.0.0:5000/
Now, navigate to localhost:5000 in your browser and make sure you can see “hello world” printed out in the browser window.