一,
$> sudo apt-get install python-setuptools python-dev libmysqlclient15-dev
二,
wget http://pypi.python.org/packages/source/M/MySQL-python/MySQL-python-1.2.3.tar.gz#md5=215eddb6d853f6f4be5b4afc4154292f
三,
tar -zxvf MySQL-python-1.2.3.tar.gz
四,
cd MySQL-python-1.2.3
五,
sudo python setup.py build
六,
sudo python setup.py install
七,
~/MySQL-python-1.2.3$ python
Python 2.6.2 (release26-maint, Apr 19 2009, 01:58:18)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb