Unable to connect to Access database from Linux
It looks like your trying to run code written for Windows on Ubuntu.
It looks like the path name is not a POSIX style path.
You will need to configure linux odbc properly - or just install python on Windows and run your code there...
As far as I know there is no free linux ODBC driver for accdb files. You would likely have to convert the database, use commercial software, or access the DB from Windows.
What do I need to read Microsoft Access databases using Python?
I've used PYODBC to connect succesfully to an MS Access db - on Windows though. Install was easy, usage is fairly simple, you just need to set the right connection string (the one for MS Access is given in the list) and of you go with the examples.
ODBC access from Mac install of Python to Access database installed in Parallels
If you are running Python on the Mac side then you need to use a driver that is compatible with macOS. The Microsoft Access-Trebier (*.mdb)
ODBC driver is a Windows DLL (ODBCJT32.DLL) and I doubt very much that the Mac version of Python can use it.
You may be interested in the related question here:
Read an Access database in Python on non-Windows platform (Linux or Mac)
Connecting to MS Access with pyodbc
Microsoft Access Driver (*.mdb, *.accdb)
is Microsoft's ODBC driver for Access, and it is only available for Windows. If you want to work with Access databases directly from your Mac (i.e., without using a Windows virtual machine) then you'll either need to buy an Access ODBC driver for the Mac platform or consider one of the free options described here:
Working with an Access database in Python on non-Windows platform (Linux or Mac)
Related Topics
How to Get a Directory Listing Sorted by Creation Date in Python
How to Round a Number to Significant Figures in Python
How to Add a Constant Column in a Spark Dataframe
Execute Code When Django Starts Once Only
Pandas: Filter Rows of Dataframe with Operator Chaining
What Are the Arguments to Tkinter Variable Trace Method Callbacks
How to Open a File Using the Open with Statement
Printing All Instances of a Class
Error Unicodedecodeerror: 'Utf-8' Codec Can't Decode Byte 0Xff in Position 0: Invalid Start Byte
Scope of Lambda Functions and Their Parameters
Correct Way to Define Python Source Code Encoding
Why Do I Get a Syntaxerror for a Unicode Escape in My File Path
Adding Days to a Date in Python
How to Convert SQLalchemy Row Object to a Python Dict
Working with an Access Database in Python on Non-Windows Platform (Linux or MAC)
Creating Dataframe from a Dictionary Where Entries Have Different Lengths