1
votes

I have successfully gone through the process of installing pyodbc for Python 2.7, however when I run the following code:

cnx = pyodbc.connect("DRIVER={Teradata};DBCNAME=<DBCNAME>;DATABASE=<DB>;UID=%s;PWD=%s" % (username, password), autocommit=True, ANSI=True)

I get the following error:

pyodbc.Error: ('00000', '[00000] [iODBC][Driver Manager]dlopen(/Library/Application Support/teradata/client/ODBC/lib/tdata.dylib, 6): Library not loaded: libtdparse.dylib\n Referenced from: /Library/Application Support/teradata/client/ODBC/lib/tdata.dylib\n Reason: unsafe use of relative (0) (SQLDriverConnect)')

Note: this is a different error than what appears in this post. I am on OS X El Capitan 10.13, if that matters.

1

1 Answers

0
votes

The issue was with the System Integrity Protection for OS X El Capitan. After that was removed the error disappeared and everything is working fine. To disable SIP follow the directions at the bottom here: http://www.macworld.com/article/2986118/security/how-to-modify-system-integrity-protection-in-el-capitan.html