Python Azure SQL - 'ODBC Driver 17 for SQL Server' : 未找到文件。

问题描述 投票:1回答:1

我必须将我的脚本连接到Azure上托管的MSSQL。我按照这个教程从微软。https:/www.microsoft.comen-ussql-serverdeveloper-get-startedpythonmacstep2.html

我根据自己的需要修改了一下,但是连接部分还是一样的,然后我就出现了这个错误。('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")

我已经安装了ODBC驱动程序与 brew 在MacOS上,我可以用终端连接到我的数据库,并使用 sqlcmd 命令。

EDIT:该 brew 选择权 --no-sandbox 的msodbcsql17对我不起作用。问题似乎是因为这个。

python sql-server python-3.x odbc pyodbc
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.