MySQLdb download address
https://github.com/farcepest/moist
The installation process is as follows
$ tar zxvf downloaded file
$ python setup.py build
$ python setup.py install
Install the setuptool tool
https://pypi.python.org/packages/source/s/setuptools
$ tar zxvf downloaded file
$ python setup.py build
$ python setup.py install
The following problems may occur:
one,
This is because the development package of mysql is not installed, execute the following command to install:
$ sudo apt-get install libmysqlclient-dev
Question two:
This is because the python development package is not installed, execute the following command to install:
$ sudo apt-get install python-dev
Supplementary note, MySQLdb does not support python3 installation