python
install_error
ai_generated
true
无法加载插件:sqlalchemy.dialects:mysql.connector
sqlalchemy.exc.NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:mysql.connector
ID: python/sqlalchemy-missing-driver-for-dialect
80%修复率
88%置信度
0证据数
2025-06-07首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.x | active | — | — | — |
根因分析
指定的 MySQL 方言需要未安装的驱动。
English
The specified MySQL dialect requires a driver that is not installed.
解决方案
-
95% 成功率
pip install mysql-connector-python engine = create_engine('mysql+mysqlconnector://user:pass@localhost/db') -
90% 成功率
pip install pymysql engine = create_engine('mysql+pymysql://user:pass@localhost/db')
无效尝试
常见但无效的做法:
-
40% 失败
URL dialect must match installed driver.
-
60% 失败
The driver is still missing.