I'm trying to work with MDB (Microsoft Access) files with Python. So far no luck, but it seems that with mdbtools and its odbc lib we could get it working. So far i've installed odbc-mdbtools with apt and pyodbc with pip. When running this code :
import pyodbc
# print(pyodbc.drivers())
odbc_connection_str = (
"DRIVER={MDBTools};DBQ=file.mdb;"
)
connection = pyodbc.connect(odbc_connection_str)
cursor = connection.cursor()
query = "SELECT * FROM TABLE"
cursor.execute(query)
rows = cursor.fetchall()
for row in rows:
print(row)
I get this error :
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'libmdbodbc.so' : file not found (0) (SQLDriverConnect)")
I'm unable to install the library libmdbodb with apt: no version is available. Is there another library that I could use or any other solution I could try ? Thank you