解决办法:
第一步:
命令行下安装模块:mysql-connector-python
pip install mysql-connector-python
第二步:
将连接引擎的:mysql+pymysql
engine = create_engine(“mysql+pymysql//user:password@host/{data_base}”,encoding=‘utf-8’)
修改为:mysql+mysqlconnector
engine = create_engine(“mysql+mysqlconnector//user:password@host/{data_base}”,encoding=‘utf-8’)