2000人QQ群 : 67842417
Join us if you will.

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-3ir0He/MySQL-python/

Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-3ir0He/MySQL-python/

在linux系统安装MySQL-Python模块一直在报这个错,Google搜索了很久,看了一些不靠谱的解决方案浪费掉了一些时间,所幸在国外的stackoverflow上找到真正的解决方案,把解决办法写在这里,没有梯子的童鞋可以参考参考:

It seems mysql_config is missing on your system or the installer could not find it. Be sure mysql_config is really installed.
For example on Debian/Ubuntu you must install the package:

sudo apt-get install libmysqlclient-dev

Maybe the mysql_config is not in your path, it will be the case when you compile by yourself the mysql suite.

For CentOS:

yum install python-devel mysql-devel

Leave a comment

电子邮件地址不会被公开。 必填项已用*标注