[Fixed] mysql_config command not found error when install mysqlclient package on Mac OS

A developer has many Python projects using Django and mySQL. They have been deployed to AWS cloud and Azure cloud. Few days after he get new project with the same technology stack. He starts new environment and installs required packages with mysqlclient included, but getting the following error:




It is the same issue for new player for being misunderstood. That's why it sometime took people up to hours for searching solution.

Even the solution is definitely very easy. 

$ brew install mysql-client
$ echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile
$ export PATH="/usr/local/opt/mysql-client/bin:$PATH"

Then try install command again:
$ pip install mysqlclient


Happy coding. 

Comments