AttributeError:模块“sqlalchemy”没有属性“engine”

2024-10-01 09:27:19 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用Pandas从Microsoft SQL Server获取数据。 我使用read_sql_query,我不明白为什么会出现以下错误:

in read_sql_query
    pandas_sql = pandasSQL_builder(con)
in pandasSQL_builder
    if _is_sqlalchemy_connectable(con):
in _is_sqlalchemy_connectable
    return isinstance(con, sqlalchemy.engine.Connectable)
AttributeError: module 'sqlalchemy' has no attribute 'engine'

我使用python3.6 我的熊猫版本是0.19.2 我的sqlalchemy版本是1.1.15


Tags: in版本pandasreadsqlsqlalchemyisbuilder