centos 6.7 python安装pymssql

yum -y remove selinux*
sed -i 's/202.106.46.151/202.106.0.20/g' /etc/resolv.conf
yum -y install gcc gcc-c++ pcre pcre-devel openssl openssl-devel 
yum install zlib-devel bzip2-devel pcre-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel -y
yum -y install lrzsz
yum -y update

tar -zxvf Python-3.5.1.tgz
cd Python-3.5.1
./configure
make && make install

pip3 install cython

tar -jxvf freetds-current.tar.bz2
cd freetds-dev.0.99.636/
./configure --prefix=/usr/local/freetds  --enable-msdblib --enable-dbmfix --with-gnu-ld --enable-shared --enable-static --with-tdsver=7.1
make && make install
sed '1 a/usr/local/freetds/lib' -i /etc/ld.so.conf
ldconfig
export PYMSSQL_BUILD_WITH_BUNDLED_FREETDS=1

pip3 install pymssql

你可能感兴趣的:(python)