Issues Installing mysql-python via pip on Ubuntu
While attempting to install mysql-python using pip, an error message indicates that mysql_config is not found. This error occurs due to the absence of mysql_config on the system or the inability of the installer to locate it.
Solution
To resolve the issue, ensure that mysql_config is installed on your system. For Debian/Ubuntu-based systems, install the required package:
sudo apt-get install libmysqlclient-dev
In the case of self-compilation of the MySQL suite, mysql_config may not be added to the path.
Recent Ubuntu Systems
For recent versions of Debian/Ubuntu (as of 2018), use the following command:
sudo apt install default-libmysqlclient-dev
Once mysql_config has been correctly installed or added to the path, you should be able to successfully install mysql-python using pip.
The above is the detailed content of Why is `mysql_config` not found when installing `mysql-python` via pip on Ubuntu?. For more information, please follow other related articles on the PHP Chinese website!