发布时间:2019-08-27 08:03:41编辑:auto阅读(2730)
安装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 |
上一篇: Python 例题 -- 巴比伦平方根算
下一篇: python 2.7后的字符串赋值
54454
41220
35750
31295
26199
25915
24419
19951
15997
15435
2324°
2121°
2214°
2344°
2303°
2511°
2457°
2274°
2351°
2320°