6

So I've been going in circles looking for answers to this and it seems to be a problem very specific to my situation.

I am trying to get a Python Django project connecting to an Azure SQL Database with the ODBC 17 Driver.

I have used brew to install msodbcsql17 and mssql-tools.

I have created a virtualenv using pip install virtualenv and python3 -m venv env

After activating this virtual environment with source ./env/bin/activate and trying pip install pyodbc I get this error:

ld: library not found for -lodbc

I'm guessing this is some sort of PATH issue, but I'm ignorant on how to debug it or correct it.

Any information on how to properly set up Python and Django on Mac OS 11.4 to work with Azure SQL database in a virtual environment would be much appreciated, because everything I have tried os far has led me to similar dead ends with libraries not being found or loaded one way or another.

Edit 1:

So I've discovered from https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos?view=sql-server-ver15 that ODBC does not support M1, which I realize now is what my laptop has... so this may be the underlying issue for all the problems I've been encountering.

TheJoe
  • 125
  • 7

0 Answers0