sudo apt-get install unixodbc-dev
pip install pyodbc
If the system have not ODBC driver, you will get below error.
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 13 for SQL Server' : file not found (0) (SQLDriverConnect)")
sudo su
wget -qo - https://packages.microsoft.com/keys/microsoft.asc
apt-key add microsoft.asc
apt-get update
apt-get install msodbcsql
cat /etc/odbcinst.ini
https://stackoverflow.com/questions/2960339/unable-to-install-pyodbc-on-linux
https://code.google.com/archive/p/pyodbc/wikis/Building.wiki