I was trying to connect to ipython notebook with dremio server on my localhost (MacOS) by could not connect to it. Python version is 2.7 and pyodbc version is 3.1.1 My code below:
import pyodbc, pandas
Note also that pyodbc and ODBC configuration on Mac might be slightly harder than on other platforms. MacOS provides an ODBC manager (iODBC), which can be configured by updating configuration files under /Library/ODBC (and ~/Library/ODBC).When you run the Dremio Connector installer program, it registers the driver with it automatically. But for some reason, pyodbc on MacOS often requires another ODBC manager: unixODBC, and unixODBC configuration files are often located under /etc. If you are in this situation, you will have to update unixODBC configuration file to register the Dremio ODBC connector (you can simply copy the iODBC configuration).
It seems your pyodbc installation uses unixODBC. Can you see if the details I provided to you on how to configure unixODBC on Mac for the Dremio ODBC driver is helpful to you?
I had a similar issue. If you look at /Library/ODBC/odbc.ini, you should see the configuration for the Dremio connector. Under the driver property, copy the given path and try using that for the driver string in your code. Mine is /Library/Dremio/ODBC/lib/libdrillodbc_sbu.dylib. This is an old thread, but someone hopefully will find it useful
Thank you @benji, you saved me a lot of time. Maybe this should be included somewhere in the documentation as almost two years later the issue persists.
@rmlopes, you can also copy the example odbc.ini file in your MacOS home directory and call it .odbc.ini. Then you could specify the DSN value in your connection string to be one those listed in that file.