I have a problem that I hope this community can help with. I am trying to resurrect an old (10 + years) program that was written in the 32-bit version of python 2.6.6. The high-level purpose of the program is to visualize data that is stored in an Access DB. However, I need to adapt the code to account for some minor differences in how this program was originally used vs. how I want it to be used (differences in data types, visualization techniques, DB table names/structures/location, etc).
So, I went ahead and downloaded/installed the 32-bit version of Python 2.6.6 along with all the necessary 32-bit packages (matplotlib, scipy, numpy, pyodbc, wxPython). The problem that prompted this thread is that there are compatibility issues between 32-bit pyodbc and the 64-bit version of the Access/Access ODBS driver. I’m not sure if this is because there is no 32-bit ODBC driver on my machine, or there is 32-bit ODBC driver on my machine that isn’t compatible with 64-bit Access. Either way, I’m not able to create a connection to the Access DB.
I've listed a few potential solutions. Now please know that I am (at best) a beginner when it comes to python/programming. Also, please note that I am not able to install pip with this version of Python due to deprecation issues. So any alternative packages would need to have installers.
Not sure if this is possible but install a 32-bit version of MS Access on my machine (I’m currently trying to connect to an Access DB that stored locally on my machine). If so, I don’t think this would be a long-term option as the future database will be on a server that uses 64-bit MS Access.
Use a 64-bit version of Python 2.6.6 & packages. The problem here is that most of the package aren’t offered in a 64-bit installer format for the version that I need (specifically numpy, scipy, and pyodbc). The source code is available, and I understand that there might be methods to compile 64-bit build distributions, but I have no idea how to do this. First, is this even possible (build 64 bit from source code)? If yes, any references that clearly explain how to do this?
Completely rebuilt the program in Python 3 since most/if-not-all packages are offered in 64-bit. I’m guessing that this would be the recommended approach, but considering my experience level, this would be the nuclear option.
Any other potential solutions?
Original error that notified me of the problem:
Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnectW)')
Found an easy solution. Turns out all I needed was a 32-bit ODBC driver for .accdb files installed on my machine (which I didn't have). So downloading from microsoft fixed the issue, and I'm now able to use 32-bit python/pyodbc to connect to a 64-bit MS access database.
https://www.microsoft.com/en-us/download/details.aspx?id=13255