把以下目录导入到机器某目录,例如/mnt/w/python目录下
setuptools-2.0.tar.gz
MySQL-python-1.2.5.zip
pip-7.1.2.tar.gz
#安装setuptools
tar xvf setuptools-2.0.tar.gz
cd setuptools-2.0
python setup.py build
python setup.py install
#安装pip
cd ..
tar xvf pip-7.1.2.tar.gz
cd pip-7.1.2
python setup.py install
#挂载安装光盘1
#假定yum源已经配置为/mnt/ct1,参见另一篇文章
mount -o loop /dev/dvd2 /mnt/ct1
#安装zip和unzip
yum -y install zip
yum -y install unzip
#安装python MySQLdb所需包
yum -y install python-devel mysql-devel zlib-devel openssl-devel
#安装python MySQLdb
cd ..
unzip MySQL-python-1.2.5.zip
cd MySQL-python-1.2.5
python setup.py install
验证
python
>>>import MySQLdb
参考资料
CentOS下安装python-mysqldb出现的问题
http://www.educity.cn/shujuku/1601254.html
Linux 下安装python软件包(pip、nose、virtualenv、distribute )
http://blog.csdn.net/my2010sam/article/details/18315687
python使用mysql数据库
http://www.cnblogs.com/fnng/p/3565912.html
setuptools-2.0.tar.gz
MySQL-python-1.2.5.zip
pip-7.1.2.tar.gz
#安装setuptools
tar xvf setuptools-2.0.tar.gz
cd setuptools-2.0
python setup.py build
python setup.py install
#安装pip
cd ..
tar xvf pip-7.1.2.tar.gz
cd pip-7.1.2
python setup.py install
#挂载安装光盘1
#假定yum源已经配置为/mnt/ct1,参见另一篇文章
mount -o loop /dev/dvd2 /mnt/ct1
#安装zip和unzip
yum -y install zip
yum -y install unzip
#安装python MySQLdb所需包
yum -y install python-devel mysql-devel zlib-devel openssl-devel
#安装python MySQLdb
cd ..
unzip MySQL-python-1.2.5.zip
cd MySQL-python-1.2.5
python setup.py install
验证
python
>>>import MySQLdb
参考资料
CentOS下安装python-mysqldb出现的问题
http://www.educity.cn/shujuku/1601254.html
Linux 下安装python软件包(pip、nose、virtualenv、distribute )
http://blog.csdn.net/my2010sam/article/details/18315687
python使用mysql数据库
http://www.cnblogs.com/fnng/p/3565912.html