解决方法:
先把之前装的卸载干净:
pip uninstall mysql-python
brew uninstall mysql-connector-c
现在设置下mysql_config路径:
首先修改系统配置文件vim ~/.bash_profile或者有些人是 ~/.profile,export PATH=$PATH:/Applications/MAMP/Library/bin
这里/Applications/MAMP/Library/bin是MAMP的mysql配置文件路径
安装
brew install mysql-connector-c
pip install mysql-python
我是这么搞定的