When installing mysql-python, the following error occurs:
Sh: mysql_config: not foundTraceback (most recent call last): File "setup. py ", line 15, in <module> metadata, options = get_config () File"/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py ", line 43, in get_config libs = mysql_config ("libs_r") File "/home/zhxia/apps/source/MySQL-python-1.2.3/setup_posix.py", line 24, in mysql_config raise EnvironmentError ("% s not found" % (mysql_config.path,) EnvironmentError: mysql_config not found
If the cause is that libmysqlclient-dev is not installed
Sudo apt-get install libmysqlclient-dev
Find the path of the mysql_config File
Sudo updatedblocate mysql_config
Mysql_config:/usr/bin/mysql_config
Find the setup_posix.py file in the mysql-python source package, find mysql_config.path in the file, change its value to/usr/bin/mysql_config, and then sudo python setup. py install.