What do I need to read Microsoft Access databases using Python?

calendar_today Asked May 12, 2009
thumb_up 25 upvotes
history Updated April 16, 2026

Question posted 2009 · +24 upvotes

How can I access Microsoft Access databases in Python? With SQL?

I’d prefere a solution that works with Linux, but I could also settle for Windows.

I only require read access.

Accepted answer +25 upvotes

On Linux, MDBTools is your only chance as of now. [disputed]

On Windows, you can deal with mdb files with pypyodbc.

To create an Access mdb file:

import pypyodbc
pypyodbc.win_create_mdb( "D:\Your_MDB_file_path.mdb" )

Here is an Hello World script that fully demostate pypyodbc’s Access support functions.

Disclaimer: I’m the developer of pypyodbc.

External references cited (2)

Top ms-access Q&A (6)

+25 upvotes ranks this answer #4 out of 55 ms-access solutions on this site — top 7%.