Connecting to Teradata through PYODBC on Mac

Connectivity

Connecting to Teradata through PYODBC on Mac

I have been trying to connect to Teradata using PYODBC from my Mac terminal. I have the Teradata ODBC drivers installed but PYODBC doesn't seem to be able to find them. This is the connection string I have created:

pyodbc.connect('DRIVER={Teradata};DBCName=XXX;DATABASE=XXX;Authentication=TD2;UID=XXX;PWD=XXX')

And this is the error I am getting.

Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'Teradata' : file not found (0) (SQLDriverConnect)")

Is there an environment variable I need to setup so that it can find the driver?

Tags (2)
2 REPLIES
Teradata Employee

Re: Connecting to Teradata through PYODBC on Mac

Load the iODBC Data Source Administrator tool; select the Drivers tab and check for the Teradata Driver.  Most likely the Teradata ODBC Driver is not registered with the iODBC Driver Manager.  

Visitor

Re: Connecting to Teradata through PYODBC on Mac

Hi I'm having the same problem here. Could you please be more specific on how I can set the environmental variable for odbc/odbcini by loading iodbc? Thanks!