今天电脑重装系统,所有软件都重装一遍,MySQLdb模块一直装不好,纠结了好久,终于解决,方法分享给大家. MySQLdb模块安装: 1.下载MySQL-pyhon模块,网站为:https://pypi.python.org/pypi/MySQL-python/ 2.解压,进入目录,修改site.cfg文件13行,取消注释,将原路径mysql_config = /usr/local/bin/mysql_config,改为新的mysql_config = /usr/local/mysql/bin/