在 Azure Data Studio 中使用 pyodbc:无驱动程序

Using pyodbc in Azure Data Studio: no drivers

我是第一次在 Azure Data Studio 中工作。我已经成功安装了 'python'(3.7) 和 'pyodbc'(如果我尝试重新安装,我会收到依赖关系已经满足的消息)。我还在 macOS 本地尝试 运行 相同的脚本,结果相同:空列表。我期待一份驱动程序列表。关于可能发生的事情有什么想法吗?

UPDATE/SOLUTION: 我了解到 MacOS 驱动程序将在 Library/ODBC 中。如果它是空的或不存在,那么你没有可供 pyodbc 使用的驱动程序。 如果您没有驱动程序,那么您可以从某个地方获取它,所以在我的情况下 here.

只是让其他人看到解决方案,感谢@MikeB2019x 分享解决方案。

For MacOS, drivers will be in Library/OBDC. If that is empty or non-existent then you have have no drivers for pyodbc to use. If you have no driver then you get it here.