python的pip安装MySQLdb模块失败的解决方法
自己的一台云服务器Ubuntu系统却上MySQLdb模块,使用pip安装一直报错找不到该模块,查询资料才知道MySQLdb模块的包名叫mysql-python,于是安装该包:
运行命令:pip install mysql-python
运行报错:EvironmentError:mysql_config not found
出现上述报错就安装libmysqlclient-dev: apt-get install libmysqlclient-dev
如安装报错:error:command \'x86_64-linux-gnu-gcc\' failed with exit status 1
出现上述报错就安装python-dev: apt-get install python-dev
再次运行: pip install mysql-python
运行成功 !!!