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

猜你喜欢

转载自www.cnblogs.com/bruce-gou/p/10243476.html