The following errors occur in both Pip and Apt-get when installing the MySQLdb module.
[Email protected]:~# cd mysql-python-1.2.3[email protected]:~/mysql-python-1.2.3# python setup.py install Sh:mysql_ Config:not Foundtraceback (most recent): File ' setup.py ', line, <module> metadata, options = ge T_config () file "/root/mysql-python-1.2.3/setup_posix.py", line +, in Get_config libs = Mysql_config ("libs_r") file "/root/mysql-python-1.2.3/setup_posix.py", line, in Mysql_config raise EnvironmentError ('%s not found '% (mysql_conf Ig.path,)) Environmenterror:mysql_config not found
This is due to a lack of Libmysqld_dev, Libmysqlclient_dev two development packages.
In the installation process directly apt the two packages, while modifying the source code directory under the setup_posix.py file,
Modify Mysql_config.path to Mysql_config.path= "/usr/bin/mysql_config"
The PIP installation is successful again.
Python installation mysqldb mysql_config not fount cause