user1458476
user1458476

Reputation: 143

PyODBC "Image not found (0) (SQLDriverConnect)"

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

Upvotes: 1

Views: 1972

Answers (1)

Yevgen Yampolskiy
Yevgen Yampolskiy

Reputation: 7198

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.

Upvotes: 3

Related Questions