1. 程式人生 > >Mac安裝Mysql-python _mysql.c:44:10: fatal error: 'my_config.h' file not found

Mac安裝Mysql-python _mysql.c:44:10: fatal error: 'my_config.h' file not found

解決步驟

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