Failed to build pyodbc when installing sqlalchemy-dremio on M1 MAC Monterey

I tried the following steps as mentioned in various website along with Dremio,
" > ```

brew install unixodbc
export LDFLAGS=“-L/opt/homebrew/Cellar/unixodbc/2.3.9_1/lib”
export CPPFLAGS=“-I/opt/homebrew/Cellar/unixodbc/2.3.9_1/include”
pip install pyodbc

But I am still facing the following issue. Can some one please help me

" Collecting pyodbc

Using cached pyodbc-4.0.32.tar.gz (280 kB)
Preparing metadata (setup.py) … done
Using legacy ‘setup.py install’ for pyodbc, since package ‘wheel’ is not installed.
Installing collected packages: pyodbc
Running setup.py install for pyodbc … error
error: subprocess-exited-with-error

In file included from src/buffer.cpp:12:
src/pyodbc.h:56:10: fatal error: ‘sql.h’ file not found
#include <sql.h>
^~~~~~~
1 error generated.
error: command ‘/usr/bin/clang’ failed with exit code "

Can someone please help me

@ajayacharya Trying to narrow down the fact that it is M1, have you tried the same on an Intel MAC and it works?

I had this exact same issue, look at this guy’s solution for integrating it with superset: superset 0.36.0 can not connect to sqlalchemy_dremio · Issue #9610 · apache/superset · GitHub

Hi colet,

When did you encounter this?
The sqlalcheme-dremio refers to a odbc driver in the prerequisites, but that doesn’t appear to be available anymore:
https://download.dremio.com/

@balaji.ramaswamy . I am sorry for the delay in response.
Yes the script in running in Intel MAC.I was able to solve it in Mac by changing python version

I have a question, My team uses pyarrow.flight to connect with dremio in Python in Intel MAC.

When I was trying to install pyarrow.flight package in MAC M1 , I am getting "ModuleNotFoundError: No module named ‘pyarrow._flight’ " error.

I reached out to Apache team in Jira and they mentioned that “flight is not shipped in all versions of the wheel and unavailable in MAC M1 processor as it has been turned off”

([ARROW-13657] [Python] No module named 'pyarrow._flight' (MacOS) - ASF JIRA )

Do you know of any way I can run dremio in Python without pyarrow.flight module??
It is really important.

Thanks

@balaji.ramaswamy . Can you please help me with the above question. Thanks

@ajayacharya Sorry for the delay in response, I was OOO for a few weeks, I have pinged the right person for this and you should hear back