Installing the Pymssql module for Python to connect to SQL Server

Source: Internet
Author: User

1. Install dependent packages

Yum install-y gcc Python-devel

2, installation FreeTDS

: Http://pan.baidu.com/s/1pLKtFBl

Tar zxvf freetds-0.82.tar.gz

CD freetds-0.82

./configure--prefix=/usr/local/freetds--with-tdsver=8.0--enable-msdblib--enable-dbmfix--with-gnu-ld-- Enable-shared--enable-static

Make && make install

echo "/usr/local/freetds/lib" >>/etc/ld.so.conf.d/freetds.conf

Ldconfig-v

3, Installation Setuptools

: Http://pan.baidu.com/s/1bpDW8cZ

Tar zxvf setuptools-28.8.0.tar.gz

CD setuptools-28.7.1

Python setup.py Install

4, Installation Pymssql

: Http://pan.baidu.com/s/1kVa0DKz

Tar zxvf pymssql-2.1.0.tar.gz

CD pymssql-2.1.0

Python setup.py Install

Note: Install FreeTDS, will report the following error

Error:command ' gcc ' failed with exit status 1

Installing the Pymssql module for Python to connect to SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.