Error in connecting to SQL Server using pyodbc

I have installed pyodbc and when I execute my code I am getting this error:

sqlalchemy.exc.DBAPIError: (pyodbc.Error) (‘01000’, “[01000] [unixODBC][Driver Manager]Can’t open lib ‘SQL Server’ : file not found (0) (SQLDriverConnect)”)

(Background on this error at: Error Messages — SQLAlchemy 2.0 Documentation)

I want to connect to an SQL Server and am using MacOS which I think is where the error is emanating from. I tested the code using Windows and it’s not returning this error.