Tag Archives: EnvironmentError: mysql_config not found

EnvironmentError: mysql_config not found

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Error in installing MySQL Python: environmenterror: MySQL_ config not found

Solution:

The reason why the installation failed is that libmysqlclient dev was not installed

Installation command:

sudo apt-get install libmysqlclient-dev

Use the following command to find mysql_ Path to config

sudo updatedb; locate mysql_ config

In the location of MySQL config/usr/bin/MySQL_ config

Looking for setup in the source code package of MySQL Python_ In posix.py file, modify MySQL in the file_ Path of config.path/usr/bin/MySQL_ config.

python setup.py build

python setup.py install

Note: the above execution environment is under root user