1.安装pymssql
安装freetds
wget ftp://ftp.freetds.org/pub/freetds/stable/freetds-patched.tar.gz
./configure --prefix=/usr/local/freetds --with-tdsver=8.0 --enable-msdblib
make&make install
2.pip install pymssql
virtualenv的使用:
$ mkdir myproject
$ cd myproject
$ virtualenv env //创建一个名为env的目录,这个目录就是一个独立的python环境
$ . env/bin/activate //激活名为env的环境,注意"."点后面有关空格;