Is it possible for 64-bit pyodbc to talk to 32-bit MS access database?

I'm not a python expert, but just to clarify some possible misconceptions... The Access database file is not 32-bit or 64-bit. Both 32-bit and 64-bit version of Access use the same database file format.

You do not need the MS Office Access application to connect to or use an Access database file. You can download the Access Database Engine which includes ODBC drivers. The most recent 2010 version has both 32-bit and 64-bit versions. You just need to specify the proper driver in your connection string to use the 64-bit driver. Again, this does not speak directly to connections in Python, but perhaps you can get it to work directly using 64-bit drivers.


Unfortunately, you need 32-bit Python to talk to 32-bit MS Access. However, you should be able to install a 32-bit version of Python alongside 64-bit Python. Assuming you are using Windows, during a custom install you can pick the destination path. Then use a virtualenv. For example, if you install to C:\Python36-32:

virtualenv --python=C:\Python36-32\bin\python.exe

Good luck!


Yes you can:

Just install

AccessDatabaseEngine_X64.exe /passive

(which contains both the x86 and x64 version of the drivers) and you will be okay. Do not forget the /passive option because if you do it won't install unless you have MS Office 2010 installed as well. You can download the file from the Microsoft Access Database Engine 2010 Redistributable site

After you install AccessDatabaseEngine_X64.exe you should run the following code on your python shell to test everything's okay:

import pyodbc
[x for x in pyodbc.drivers() if x.startswith('Microsoft')]

and you should get a printout like

['Microsoft Access Driver (*.mdb, *.accdb)',
 'Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)',
 'Microsoft Access dBASE Driver (*.dbf, *.ndx, *.mdx)', 
 'Microsoft Access Text Driver (*.txt, *.csv)']

Take care.