Notes on deplying django with virtualenv mod_wsgi and apache on ubuntu

This post was written 5 years ago.
Wed, 21 Dec 2011
As i've exclusively been using app engine in my day job at Potato, I haven't yet had to deal with deploying a django site on my own Ubuntu server yet. I knew that I would be using virtualenv, apache and mod_wsgi, but hadn't yet worked out how this is done.

Rather than repeating it all here - I followed most of the steps in this blog post.
However, there were a few points where things didn't go to plan:-

First of all I got the ubiquitous mysql_config not found error when attempting to install:-

pip install mysql-python

So, apparently the solution is to install libmysqlclient-dev:-


sudo apt-get install libmysqlclient-dev

However, if you get this error:-

error: command 'gcc' failed with exit status 1

You need to install python-dev:-

sudo apt-get install python-dev




This post was written 5 years ago, which in internet time is really, really old. This means that what is written above, and the links contained within, may now be obsolete, inaccurate or wildly out of context, so please bear that in mind :)