解决步骤

brew install mysql
brew unlink mysql
brew install mysql-connector-c
sed -i -e 's/libs="$libs -l "/libs="$libs -lmysqlclient -lssl -lcrypto"/g' /usr/local/Cellar/mysql/8.0.13/bin/mysql_config //后面的路径就是你 mysql 的安装路径,这个尤为重要,就是路径问题报错的
pip install MySQL-python
brew unlink mysql-connector-c
brew link --overwrite mysql

 

 

来源:https://stackoverflow.com/questions/12218229/my-config-h-file-not-found-when-intall-mysql-python-on-osx-10-8/12233148

 

posted on 2019-01-09 11:55  浅唱年华1920  阅读(4330)  评论(0编辑  收藏  举报