In file included from src/buffer.cpp:12:0:
src/pyodbc.h:56:10: fatal error: sql.h: No such file or directory
#include <sql.h>
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Solution
sudo apt-get install libmysqlclient-dev
sudo apt-get install python3-pymysql
sudo apt-get install python3.6-dev
sudo apt-get install python-mysqldb
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
sudo pip3 install mysqlclient
Example for Ubuntu:
sudo apt-get install unixodbc unixodbc-dev
Example for CentOS:
sudo yum install unixODBC-devel
On Windows:
conn = pyodbc.connect('DRIVER={SQL Server};SERVER=yourserver.yourcompany.com;DATABASE=yourdb;UID=user;PWD=password')
On Linux:
conn = pyodbc.connect('DRIVER=FreeTDS};SERVER=yourserver.yourcompany.com;PORT=1433;
Subscribe to:
Post Comments (Atom)
Videos based solutions
City / Traffic Surveillance Target Sectors Government Sectors Traffic Surveillance Highway and State Road Surveillance Defense Ai...
-
tesseract_ocr.cpp(626): fatal error C1083: Cannot open include file: 'leptonica/allheaders.h': No such file or directory error...
-
Type Data Structure: Data Structure can be defined as the specific form of organizing and storing the data. R Programming supports five ...
-
Conditional Statement: In R we have two Conditional Statement. One is If else Statement and another one is Nested If Else Statement. It ...
No comments:
Post a Comment