因为同事用了python的MySQL-python库,在mac下安装折腾了半天,下面是安装步骤:
1. brew install mysql
2. brew unlink mysql
3. brew install mysql-connector-c
4. sed -i -e 's/libs="$libs -l "/libs="$libs -lmysqlclient -lssl -lcrypto"/g' /usr/local/bin/mysql_config
5. pip install MySQL-python
6. brew unlink mysql-connector-c
7. brew link --overwrite mysql
在安装中也许有其他依赖包,请直接pip安装就好了
pip2 install ConfigParser
网友评论