Troubleshooting MySQL-python Installation on Ubuntu
In an attempt to install MySQL-python on Ubuntu/Linux, an error indicating "sh: mysql_config: not found" was encountered. To resolve this issue and ensure a successful installation, consider the following suggestions:
Recommended Approach:
Ubuntu users are advised to utilize the distribution's repository for installing MySQL-python. The following command should facilitate the process:
sudo apt-get install python-mysqldb
Alternative Using Pip:
If you prefer using pip for installation, follow these steps:
sudo apt-get install build-essential python-dev libmysqlclient-dev
The above is the detailed content of How to Resolve \'sh: mysql_config: not found\' Error During MySQL-python Installation on Ubuntu?. For more information, please follow other related articles on the PHP Chinese website!