Mac进行pip install mysqlclient报错的解决办法(M1芯片)

zhuanbike 2022-12-8 758


1、首先卸载重装homebrew

卸载

/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/uninstall.sh)"

重装

/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"


2、安装mysql mysql-client

brew install mysql
arch -arm64 brew install mysql-client


3、在python环境下再尝试pip安装

echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile

export PATH="/usr/local/opt/mysql-client/bin:$PATH"

pip install mysqlclient




最新回复 (0)
发新帖