Installing Microsoft ODBC Driver to connect to SQL from Python on Mac OS X

What a nightmare it's been for me to figure this out.

Remember to have homebrew installed in advance.

Then run this in terminal:

brew install msodbcsql
At first, it didn't work for me, saying something about taps was empty and no available formulas.

Then I found out I needed to run this command in Terminal

rm -rf /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core; brew update

Then I could run brew install msodbcsql ... but not successfully.

OK, so I tried another approach

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release brew update 

brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release

followed by...

 brew install msodbcsql17 mssql-tools

This seems to have worked! My driver is now ODBC Driver 17 for SQL Server

Ressources:

Comments

Popular posts from this blog

Connection to MSSQL with Pythonan and pyodbc (on Mac OS X)

Installing PyCharm on Mac