Skip to content

Instantly share code, notes, and snippets.

@cwade
cwade / sql_server_from_python.md
Last active June 23, 2024 22:38
Using Python to connect to a Microsoft SQL Server database from OS X using Windows authentication

There are many instructions out there on how to do this, but none quite worked for me. I'm currently on a Mac running OS X Mojave (10.14.4)

These instructions got me closest, but I still couldn't get the python part of the equation to work.

Here's what worked for me.

First, install unixodbc using Homebrew. I highly recommend using Homebrew here because it's a little more complicated to install on its own.

brew install unixodbc