pip install mysql-python
如果遇到找不到mysql_config文件时,要先安装 mysql-community-devel
yum install mysql-community-devel
安装mysql源
rpm -ivh
yum install mysql-community-devel
然后重新pip install mysql-python,如果还遇到下图的问题
再执行以下命令安装python-devel
yum install python-devel
安装完后执行
pip install mysql-python就可以安装MySQLdb模块了