安装pymssql需要的包:
freetds(http://www.filewatcher.com/m/freetds-0.82.tar.gz.1596755-0.html)
setuptools(https://pypi.python.org/pypi/setuptools)
pymssql(https://pypi.python.org/pypi/pymssql/)
安装步骤:
1. 安装freetds
#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
2. 安装setuptools
#tar zxvf setuptools-3.5.1.tar.gz
#cd setuptools-3.5.1
# python setup.py install
3. 安装pymssql
#tar zxvf pymssql-2.1.0.tar.gz
#cd pymssql-2.1.0
#python setup.py install
注:如果不安装freetds,会报如下错误:
error: command 'gcc' failed with exit status 1 |