1. First you need to determine the Ubuntu update source can be used, 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 reason is that the Setup program cannot find the Mysql_config file under/usr/bin/.
In the online search of the solution, it is generally said that you do not have Libmysqld-dev or Libmysqlclient-dev, but check the discovery of all exist.
First an important python-dev is generally not installed, so sudo apt-get install is required Python-dev
Continue to install Mysql-python, found or not.
Re-install Libmysqlclient-dev,
The miracle finally appeared:
Ubuntu installation Mysql-python