Unable to install pyodbc on Linux Unable to install pyodbc on Linux python python

Unable to install pyodbc on Linux


On Ubuntu, you'll need to install unixodbc-dev:

sudo apt-get install unixodbc-dev

Install pip by using this command:

sudo apt-get install python-pip

once that is installed, you should be able to install pyodbc successfully:

pip install pyodbc


I resolved my issue by following correct directions on pyodbc - Building wiki which states:

On Linux, pyodbc is typically built using the unixODBC headers, so you will need unixODBC and its headers installed. On a RedHat/CentOS/Fedora box, this means you would need to install unixODBC-devel:

yum install unixODBC-devel


Adding one more answer on this question.For Linux Debian Stretch release you would need to install the following dependencies:

apt-get updateapt-get install unixodbc-devpip install pyodbc

On Debian Slim some users mentioned they needed to add g++

apt-get updateapt-get install g++ unixodbc-devpip install pyodbc