我为python2.7安装了teradata模块,teradata客户端15.00,也正确设置了环境变量ODBCINI,ODBCINST和LD_LIBRARY_PATH。但是当我在py脚本中创建连接时:
odbclib="/opt/teradata/client/15.00/odbc_64/lib/libodbc.so"
udaExec = teradata.UdaExec (appName="terapp", version="1.0", logConsole=True, odbcLibPath=odbclib)
session = udaExec.connect(method="odbc", system="XXX.XX.XX.XX",username=user, password=pass)
我明白了:
File "build/bdist.linux-x86_64/egg/teradata/udaexec.py", line 183, in connect
File "build/bdist.linux-x86_64/egg/teradata/tdodbc.py", line 374, in __init__
File "build/bdist.linux-x86_64/egg/teradata/tdodbc.py", line 206, in checkStatus
teradata.api.DatabaseError: (0, u'[IM003] [DataDirect][ODBC lib] Specified driver could not be loaded')
请,任何帮助聪明的人
答案 0 :(得分:0)
哪个版本的RHEL?这只是一个猜测,但如果它是RHEL 6,默认情况下不会安装Python 2.7,所以通过软件集合安装Python 2.7(大多数订阅的一部分)。请参阅http://developers.redhat.com/products/softwarecollections/get-started-rhel6-python/并安装python27版本。