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
It works!