我用的是麒麟版的ubantu,之前百度了好多下,提示改什么文件的,还有单独安装libmysqlclient-dev什么的都没有解决!结果发现其实就差那么一点了记录一下!成功安装MySQLdb这个模块。
ubantu安装python-mysql提示environmenterror:mysql_config not found,错误如下图:
environmenterror:mysql_config not found解决方法:
其实很简单安装下面这个两个东西就ok!
libmysqld-dev
libmysqlclient-dev
有图为证:安装MySQLdb库我用的是sudo pip install mysql-python,搭建mysql环境用sudo apt-get install mysql-server
mySQLdb is a python interface for mysql, but it is not mysql itself. And apparently mySQLdb needs the command ‘mysql_config’, so you need to install that first.