1
votes

I'm trying to use PyODBC to connect to an Access database. It works fine on Windows, but running it under OS X I get—

Traceback (most recent call last): File "", line 1, in File "access.py", line 10, in init self.connection = connect(driver='{Microsoft Access Driver (.mdb)}', dbq=path, pwd=password) pyodbc.Error: ('00000', '[00000] [iODBC][Driver Manager]dlopen({Microsoft Access Driver (.mdb)}, 6): image not found (0) (SQLDriverConnect)')

Do I have to install something else? Have I installed PyODBC wrong?

Thanks

1

1 Answers

3
votes

pyodbc allows connecting to ODBC data sources, but it does not actually implements drivers.

I'm not familiar with OS X, but on Linux ODBC sources are typically described in odbcinst.ini file (location is determined by ODBCSYSINI variable).

You will need to install Microsoft Access ODBC driver for OS X.