MacBook下如何安裝mysql-python

解決方法:

先把以前裝的卸載乾淨:
pip uninstall mysql-python
brew uninstall mysql-connector-cpython

如今設置下mysql_config路徑:
首先修改系統配置文件vim ~/.bash_profile或者有些人是 ~/.profile,mysql

export PATH=$PATH:/Applications/MAMP/Library/bin

這裏/Applications/MAMP/Library/bin是MAMP的mysql配置文件路徑sql

安裝
brew install mysql-connector-c
pip install mysql-pythonvim

搞定!bash

相關文章
相關標籤/搜索