Info gotten from here
brew install unixodbc
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9_1/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9_1/include"
pip install pyodbc
pip install dbt-sqlserver
or
pip install dbt-synapse
Info gotten from here for the brew command and from here for the symlink issue
# install the package from homebrew
brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release
brew update
HOMEBREW_NO_ENV_FILTERING=1 ACCEPT_EULA=Y brew install msodbcsql17 mssql-tools
# update the link of openssl to 1.1
rm /opt/homebrew/opt/openssl
ln -s /opt/homebrew/Cellar/[email protected]/1.1.1m /opt/homebrew/opt/openssl
export LDFLAGS="-L/opt/homebrew/Cellar/unixodbc/2.3.9_1/lib"
export CPPFLAGS="-I/opt/homebrew/Cellar/unixodbc/2.3.9_1/include"
HOMEBREW_NO_ENV_FILTERING=1 ACCEPT_EULA=Y brew install msodbcsql17 mssql-tools
@Benoit Perigaud I struggled A LOT getting things set up on pure ARM/M1 architecture. TBH, I should have given up and used Rosetta. However I did get things running.
I kept seeing this error message odbcinst: SQLInstallDriverEx failed with Invalid install path.
My solution was to manually put the unzipped .tar.gz
for msodbcsql18
and mssql-tools18
into /usr/opt/Homebrew/Cellar
, then have them symlinked into usr/local/bin
automatically by calling brew link
. Thanks @Doug Beatty for the debugging help!