Install pyodbc:
pip3 install pyodbc --break-system-packages
Create a test.py file with the following content. Replace DBCName, UID and PWD with your Teradata instance hostname, username and password:
import pyodbc
print(pyodbc.drivers())
cnxn = pyodbc.connect('DRIVER={Teradata Database ODBC Driver 20.00};DBCName=<your-teradata-hostname>;UID=<username>;PWD=<password>;')
cursor = cnxn.cursor()
cursor.execute("SELECT CURRENT_DATE")
for row in cursor.fetchall():
print(row)
Run the test application:
python3 test.py
You should get output similar to:
['ODBC Drivers', 'Teradata Database ODBC Driver 20.00']
(datetime.date(2026, 7, 10),)