linux安装pyodbc、django-pyodbc报错:src/pyodbc.h:56:17: fatal error: sql.h: No such file or directory #include <sql.h>

System: linux centos7

Development environment: python django

Database: sqlserver

setting.py file as follows

  'DatabaseName': {
    'ENGINE': 'sqlserver',
    'NAME': 'database name',
    'HOST': DATABASES_HOST,
    'PORT': DATABASES_PORT,
    'the USER': 'username',
    'PASSWORD': 'Password' ,
    'the OPTIONS': {
    'the DRIVER': 'the SQL Server Native Client 10.0',
    'MARS_Connection': True,
  },

Error: When installing and pyodbc django-pyodbc, given: src / pyodbc.h: 56: 17: fatal error: sql.h: No such file or directory #include <sql.h>

sudo yum install unixODBC-devel

Then you can install the pyodbc

Guess you like

Origin www.cnblogs.com/zoujl/p/11005449.html