Mac 安装mysqlclient包错
安装报错信息
在使用pip安装mysqlclient时,出现下面的报错
解决思路 安装mysql-connector-c:
brew install mysql-connector-c
安装完成后会有提示加入环境变量
执行命令echo 'export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"' >> ~/.zshrc
export LDFLAGS="-L/opt/homebrew/opt/mysql-client/lib" >> ~/.zshrc
export CPPFLAGS="-I/opt/homebrew/opt/mysql-client/include" >> ~/.zshrc
source ~/.zshrc
再次进行安装
pip3 install mysqlclient
本文来自博客园,作者:Lin-Grocery,转载请注明原文链接:https://www.cnblogs.com/moniter/articles/mac-an-zhuangmysqlclient-bao-cuo.html