python mysqldb模块安装

python mysqldb模块安装

总结下这个安装过程
网上搜索了半天
处处是坑啊
既爱又恨
linux下实在是让人不爽啊

 

操作系统:
redhat Red Hat Enterprise Linux Server release 5.3 (Tikanga)

系统默认python:
Python 2.4.3

现在需要安装mysqldb模块到python

1、下载
setuptools-0.6c8.tar.gz
MySQL-devel-5.5.27-1.rhel5.x86_64.rpm
MySQL-shared-5.5.27-1.rhel5.x86_64.rpm
MySQL-python-1.2.3.tar.gz


2、安装setuptools
tar -zxvf setuptools-0.6c8.tar.gz
cd setuptools-0.6c8
python setup.py build
python setup.py install

 


3、安装MySQL-devel
rpm -ivh MySQL-devel-5.5.27-1.rhel5.x86_64.rpm
rpm -ivh MySQL-shared-5.5.27-1.rhel5.x86_64.rpm

4、安装MySQL-python
tar -zxvf MySQL-python-1.2.3.tar.gz
cd MySQL-python-1.2.3

python setup.py build
python setup.py install

以上为本人亲自测试,不报错版


 

posted @ 2012-08-15 17:31  4admin2root  阅读(284)  评论(0编辑  收藏  举报