1. First you need to make sure that the Ubuntu update source is available. The following source is suitable for 13. X and 14.X, the low version of Ubuntu has not been tried. After all, labor is not a test worker.
For security reasons Cp/etc/apt/source.list/etc/apt/source.list.bak
Write the following to/etc/apt/source.list
Deb Http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse
deb Http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
deb Http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
deb Http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
2. sudo apt-get update
3.sudo Apt-get Install Mysql-python
Found an error:
Sh:mysql_config:not found
Traceback (most recent):
File "setup.py", line <module>
metadata, Options = Get_config ()
File "/home/zhxia/apps/source/mysql-python-1.2.3/setup_posix.py", line +, in Get_config
Libs = Mysql_config ("Libs_r")
File "/home/zhxia/apps/source/mysql-python-1.2.3/setup_posix.py", line, in Mysql_config
Raise EnvironmentError ("%s not found"% (Mysql_config.path,))
Environmenterror:mysql_config not found
4. The detailed reason is that the Setup program cannot find the Mysql_config file under/usr/bin/.
The solution on the web is usually to say you have no libmysqld-dev or Libmysqlclient-dev. But there's a look.
5. First an important python-dev is not normally installed, so sudo apt-get install is required Python-dev
Continue to install Mysql-python, found or not.
6. Re-install the Libmysqlclient-dev,
The miracle finally appeared:
Ubuntu Installation Mysql-python