MaxOS
安装 MySQL 和 mysqlclient
# Assume you are activating Python 3 venv
$ brew install mysql
$ pip install mysqlclient
如果你不想安装MySQL服务,你可以使用mysql-client代替
# Assume you are activating Python 3 venv
$ 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"
$ pip install mysqlclient