MacBook下如何安装mysql-python

解决方法:

先把之前装的卸载干净:
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

搞定!

 

posted @ 2016-11-14 10:04  WangC.W  阅读(246)  评论(0编辑  收藏  举报