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
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容