Skip to content
Advertisement

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

When I try to connect to a sql server database with pyodbc (on mac):

JavaScript

I get the following error:

Error: (‘01000’, “[01000] [unixODBC][Driver Manager]Can’t open lib ‘ODBC Driver 13 for SQL Server’ : file not found (0) (SQLDriverConnect)”)

When I path in the actual driver location:

JavaScript

It starts working!

My odbcinst.ini looks like this:

JavaScript

How can I get my reference to driver='{ODBC Driver 13 for SQL Server}' to start working again?

I initially used this guide to install the driver. And I’m using anaconda on Mac Sierra if that helps?

Advertisement

Answer

Running:

JavaScript

It yielded:

JavaScript

Instead of copying the files to the /etc/ directory (not sure why unixODBC thought they were there) I created a symbolic link to each file:

JavaScript

This solved the problem.

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement