You need this installed first: sudo apt-get install unixodbc-dev Then you can run: pip3 install pyodbc
apt-get update apt-get install unixodbc-dev pip install pyodbc