Installing MySQLdb mysqlclient with Homebrew and pip in OS X Mojave
June 21, 2019 ยท View on GitHub
First I used Homebrew to install the MySQL server along with mysql_config, needed to compile the Python extension:
brew install mysql
I had to then use this incantation to get pip install mysqlclient to work:
LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib/ pip install mysqlclient