1

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

user1458476
  • 143
  • 2
  • 8
  • [This similar question for Ubuntu](http://stackoverflow.com/questions/10558354/using-microsoft-access-database-mdb-with-python-on-ubuntu) seems relevant – user1458476 Jun 22 '12 at 11:07

1 Answers1

3

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.

Yevgen Yampolskiy
  • 7,022
  • 3
  • 26
  • 23