【发布时间】:2011-06-07 14:18:26
【问题描述】:
有人在 sqlalchemy 中通过 pyodbc 成功连接到 mssql 吗?我现在正在使用turbogears2,并尝试连接到mssql,在mac os平台上工作。
出现以下错误:
sqlalchemy.exc.DBAPIError: (Error) ('00000', '[00000] [iODBC][Driver Manager]dlopen({SQL Server}, 6): image not found (0) (SQLDriverConnectW)') None None
【问题讨论】:
-
您要运行的代码在哪里?
-
另外,您是否为 mssql 安装了任何 odbc 驱动程序?
-
非常感谢您的回复。以下是我在 python shell 中直接使用的一些示例代码: >>> import sqlalchemy >>> engine=sqlalchemy.create_engine('mssql+pyodbc://sa:password@host/hf_export') >>> con=engine.connect ()
-
我认为你是对的,也许我缺少 ODBC 驱动程序,我安装了 pyodbc,显然它不是驱动程序。
-
你找到OSX的驱动了吗?
标签: python macos sqlalchemy pyodbc turbogears2