Zaynul Abadin Tuhin
Zaynul Abadin Tuhin

Reputation: 32001

Facing obstacle to install pyodbc and pymssql in ubuntu 16.04

I want to install pyodbc for connection mssql server using sqlalchemy I am googling and tried in several ways like

pip install pyodbc

Followed this link Pyodbc installation error on Ubuntu 16.04 with Sql Server installed but have not solved below type error thrown

src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory
  compilation terminated.
  error: command 'gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pyodbc

Upvotes: 7

Views: 6231

Answers (3)

KnowledgeSeeeker
KnowledgeSeeeker

Reputation: 724

For RH/Cent-OS/Linux use,

yum install unixODBC
yum install unixODBC-devel

Upvotes: 2

Zaynul Abadin Tuhin
Zaynul Abadin Tuhin

Reputation: 32001

For pyodbc case I used command

sudo apt-get install unixodbc-dev
pip install pyodbc

and able to success pyodbc installation but facing my comment problem (not able to push data into mssql server)

For pymssql i used command

sudo apt-get install freetds-dev
pip install pymssql

then able to success pymssql installation and data insert into mssql server

Upvotes: 18

Md Sirajus Salayhin
Md Sirajus Salayhin

Reputation: 5144

Try this without utf16:

According to @jinksPadlock I have successfully installed:

sudo apt-get install unixodbc-dev

Upvotes: 0

Related Questions