linux下python安裝pymssql模塊

安裝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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章