又双叒叕踩坑 mysqlclient

又双叒叕踩坑 mysqlclient

MacOS 下执行 pip install mysqlclient 提示 OSError: mysql_config not found

安装 mysql

brew install mysql

添加环境变量

# /usr/local/Cellar/mysql/8.0.18_1/bin/mysql_config
# Add to PATH
vi /etc/profile # PATH=$PATH:/usr/local/Cellar/mysql/8.0.18_1/bin
source /etc/profile

指定版本安装 mysqlclient

pip install mysqlclient==1.4.4

评论

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×