title: Python2.7 - pip install pymssql fails on CentOS 6.3
body: <p>I am trying to install pymssql for Python on a CentOS machine however it keeps failing on me.</p>
  <p>I have already installed the following:</p>
  <blockquote>
  <p>freetds-devel</p>
  <p>python-devel</p>
  </blockquote>
  <p>Which seems to be the fix I keep coming across in searches, however I have already installed both of these and I am still getting the following error:</p>
  <pre><code>pip install pymssql
  Collecting pymssql
  /usr/local/lib/python2.7/site-packages/pip-6.1.1-py2.7.egg/pip/_vendor/requests/packages/urllib3/util/ssl_.py:79: 
    Using cached pymssql-2.1.1.tar.gz
  Installing collected packages: pymssql
    Running setup.py install for pymssql
      Complete output from command /usr/local/bin/python2.7 -c &quot;import setuptools, tokenize;__file__='/tmp/pip-build-oU7MKZ/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))&quot; install --record /tmp/pip-PE9Gxh-record/install-record.txt --single-version-externally-managed --compile:
      setup.py: platform.system() =&gt; 'Linux'
      setup.py: platform.architecture() =&gt; ('64bit', 'ELF')
      setup.py: platform.linux_distribution() =&gt; ('Red Hat Enterprise Linux Server', '6.3', '*******')
      setup.py: platform.libc_ver() =&gt; ('glibc', '2.3')
      setup.py: Not using bundled FreeTDS
      setup.py: include_dirs = ['/usr/local/include']
      setup.py: library_dirs = ['/usr/local/lib']
      running install
      running build
      running build_ext
      building '_mssql' extension
      creating build
      creating build/temp.linux-x86_64-2.7
      gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include -I/usr/local/include/python2.7 -c _mssql.c -o build/temp.linux-x86_64-2.7/_mssql.o -DMSDBLIB
      _mssql.c:314:22: error: sqlfront.h: No such file or directory
      In file included from _mssql.c:316:
      cpp_helpers.h:34:19: error: sybdb.h: No such file or directory
      _mssql.c:532: error: expected specifier-qualifier-list before ‘BYTE’
      _mssql.c:683: error: expected specifier-qualifier-list before ‘DBPROCESS’
  
      .............[Lots of errors removed from here]
  
      :22123: error: ‘SYBVARBINARY’ undeclared (first use in this function)
      _mssql.c:22135: error: ‘SYBVARCHAR’ undeclared (first use in this function)
      _mssql.c: At top level:
      _mssql.c:23607: error: expected ‘)’ before ‘val’
      _mssql.c:23689: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘__Pyx_PyInt_from_py_DBINT’
      error: command 'gcc' failed with exit status 1
  
      ----------------------------------------
      Command &quot;/usr/local/bin/python2.7 -c &quot;import setuptools, tokenize;__file__='/tmp/pip-build-oU7MKZ/pymssql/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))&quot; install --record /tmp/pip-PE9Gxh-record/install-record.txt --single-version-externally-managed --compile&quot; failed with error code 1 in /tmp/pip-build-oU7MKZ/pymssql
  </code></pre>
  <p>So I see this error in the log:</p>
  <blockquote>
  <p>_mssql.c:314:22: error: sqlfront.h: No such file or directory In file included from _mssql.c:316:</p>
  </blockquote>
  <p>Which from searches suggests that I need to install freetds-devel and/or python-devel but I already have.</p>
  <p>I also notice this line:</p>
  <blockquote>
  <p>setup.py: Not using bundled FreeTDS</p>
  </blockquote>
  <p>I am new to Linux based operating so I'm not sure if this means that its not using the FreeTDS at all or if it is just using the one I downloaded instead of a bundled version or something? Does this suggest that maybe the freetds-devel I downloaded is not being used correctly? If so how can I make setup.py use the freetds-devel I downloaded?</p>
  <p>If the freetds-devel is not an issue then is there something else I am missing to install pymssql?</p>
  EDIT : More info
  <p>When I run the following find command:</p>
  <blockquote>
  <p>sudo find / -name &quot;sqlfront.h&quot;</p>
  </blockquote>
  <p>The file it complains about is found here:</p>
  <blockquote>
  <p>/usr/include/freetds/sqlfront.h</p>
  </blockquote>
  <p>So is it just that my FreeTDS install is messed up or what is wrong?</p>