首页
Mac M1 安装 MySQL-python
brew install mysql

提示缺少my_config.h

  _mysql.c:36:10: fatal error: 'my_config.h' file not found  
  #include "my_config.h"           
  					^~~~~~~~~~~~~  
  1 error generated.  
  error: command 'clang' failed with exit status 1

将mysql.h copy 一份重命名为 my_config.h

cd /opt/homebrew/Cellar/mysql/8.0.22_1/include/mysql
cp mysql.h my_config.h