Can't open lib ODBC Driver 17 OSX

23,242

If anyone ever gets the same problem as I have, you have to use the solution found at:

Can't open lib 'ODBC Driver 13 for SQL Server'? Sym linking issue?

Share:
23,242
Solaiman
Author by

Solaiman

Updated on June 30, 2020

Comments

  • Solaiman
    Solaiman almost 4 years

    I have installed the driver on my Mac and tried to run the rust, unfortunately I keep getting the following message:

    Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)")

    I have followed the following instructions: https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017

    My Python code to establish the connection looks like this:

    con = pyodbc.connect(
                    r'DRIVER={ODBC Driver 17 for SQL Server};'
                    r'SERVER=;'
                    r'DATABASE=;'
                    r'UID=;'
                    r'PWD='
                    )
    

    On Windows I don't have any problems running this, but on my Mac I can't get the code running even when I have the driver installed.