Heroku Setup for Python and Flask

Getting virtualenv – Setuptools, pip, easyinstall on Ububtu

  • Install python setuptools on Ubuntu
  • Install pip on Ubuntu
  • easy_install on Ubuntu
  • virtualenv on Ubuntu – yes, get used to it.
sudo apt-get install python-setuptools
sudo apt-get install python-pip
  • Install Python development libraries, could be optional but we will use it here.
sudo apt-get install python-dev
  •  Get virtual env
sudo apt-get install python-virtualenv

You might also need a public key from your Ubuntu workstation. If your workstation is secure, you can just hit enter for the passphrase.

ssh-keygen -t rsa

Install the heroku toolbelt.

  • Install Heroku toolbelt on Ubuntu
  • Install Heroku toolbelt on AWS running Ubuntu
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh

Now your 127.0.0.1 server is in sync with Heroku libraries.

Lets start a project.

mkdir MyHerokuPyProject
mkdir MyHerokuPyProject/source

Now, logout and login in to get heroku in the PATH, or do this;

 sudo su ubuntu

Log into heroku;

heroku login

You need to make heroku aware of the public key;

heroku keys:add

Ok, let’s make sure everything is set so far by starting up virtualenv

Lets use our project directory;

cd MyHerokuPyProject 

 We will add a virtual environment to our Python Heroku project;

virtualenv vedir --distribute
source vedir/bin/activate

Now we can get bottle like this. Notice that I am getting the bottle library, not the bottle.py library. It’s the same thing, but if you try to fetch bottle.py it will fail. Easy_install is a pythoin installation system, so it knows that that which we seek is a .py hootinanny.

pip install Flask

Add the Python image library, which requires the development library;

pip install pil

— or —

sudo apt-get install python-setuptools
sudo apt-get install python-pip
sudo apt-get install python-dev
sudo apt-get install python-virtualenv
ssh-keygen -t rsa
wget -qO- https://toolbelt.heroku.com/install-ubuntu.sh | sh
mkdir MyHerokuPyProject
mkdir MyHerokuPyProject/source

log out and log in


heroku login
heroku keys:add
cd MyHerokuPyProject
virtualenv vedir --distribute
source vedir/bin/activate
pip install Flask
pip install pil

3 responses to “Heroku Setup for Python and Flask”

  1. BotLike says:

    Auto Like, Status Liker, autolike, Facebook Auto Liker, Autoliker Facebook, Autoliker, Facebook Liker, auto liker, facebook auto liker, Autoliker, Photo Liker, Status Auto Liker, Fb Autoliker, Auto Liker, Increase Facebook Likes, Photo Auto Liker, Facebook Autoliker, Working Auto Liker, auto like, autoliker

  2. Wow that was strange. I just wrote an very long comment but after I clicked submit my comment did not appear. Grrrr… well I am not writing all that over again. Anyway, just wanted to say excellent blog!|

  3. Troy Mayeux says:

    Howdy! This is my first visit to your blog! We are a team of volunteers and starting a new initiative in a community in the same niche. Your blog provided us beneficial information to work on. You have done a marvellous job!|

  4. Rosalind Huisenga says:

    hello!,I like your writing very so much! proportion we keep in touch more about your post on AOL? I need an expert on this space to unravel my problem. May be that is you! Having a look ahead to peer you. |

  5. Joe says:

    It is truly very difficult in this busy life to listen news on TV, so I just use web for that purpose, and obtain the most up-to-date news.|

  6. Wally says:

    Great beat ! I would like to apprentice while you amend your web site, how can i subscribe for a blog site? The account helped me a applicable deal. I had been a little bit familiar of this your broadcast provided bright clear concept|

  7. Devorah says:

    Oh my goodness! Amazing article dude! Thank you so much, However I am experiencing troubles with your RSS. I do not understand why I cannot join it. Is there anyone else having identical RSS issues? Anyone who knows the answer will you kindly respond? Thanks!!|

  8. Rickie says:

    Undeniably believe that which you stated. Your favorite justification appeared to be on the web the easiest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they plainly do not know about. You managed to hit the nail upon the top as well as defined out the whole thing without having side effect , people could take a signal. Will likely be back to get more. Thanks|

Leave a Reply to Devorah Cancel reply

Your email address will not be published. Required fields are marked *