MySQL-python 1.2.x 安装报'my_config.h' file not found

网上解决方案:https://www.cnblogs.com/bruce-gou/p/10243476.html

但是仍然报错,原因:MySQL-python 1.2.x 使用的是5.6 版本的mysql,但是mac 用brew install 默认安装的是最新的mysql 8.0

解决办法:

brew uninstall mysql-connector-c
brew uninstall mysql
brew install [email protected]
brew unlink [email protected]
brew install [email protected]

export PATH="/usr/local/opt/[email protected]/bin:$PATH"
export LDFLAGS="-L/usr/local/opt/[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/[email protected]/include"

export LDFLAGS="-L/usr/local/opt/mysql-connector-c\+\[email protected]/lib"
export CPPFLAGS="-I/usr/local/opt/mysql-connector-c\+\[email protected]/include"

mpip install MySQL-python==1.2.3c

你可能感兴趣的:(MySQL-python 1.2.x 安装报'my_config.h' file not found)