Install MySQLdb in virtualenv on Ubuntu

I have install the python-mysqldb on my Ubuntu server, but a missing dependency message alerted when I run a program in virtualenv.

Then I do as this post and solved my problem:

$ sudo apt-get build-dep python-mysqldb
$ source venv/bin/activate
(venv)$ pip install MySQL-python

then everything works fine.

blogroll

social