码迷,mamicode.com
首页 > 数据库 > 详细

pip安装mysql_python报错

时间:2018-09-24 00:48:35      阅读:178      评论:0      收藏:0      [点我收藏+]

标签:however   tool   fat   with   direct   cto   ble   token   stat   

pip安装mysql_python报错


    _mysql.c:29:20: fatal error: Python.h: No such file or directory
     #include "Python.h"
                        ^
    compilation terminated.
    error: command ‘gcc‘ failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python2 -u -c "import setuptools, tokenize;__file__=‘/tmp/pip-build-gmcywp/MySQL-python/setup.py‘;exec(compile(getattr(tokenize, ‘open‘, open)(__file__).read().replace(‘\r\n‘, ‘\n‘), __file__, ‘exec‘))" install --record /tmp/pip-uSDDOK-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-gmcywp/MySQL-python/
You are using pip version 8.1.2, however version 18.0 is available.
You should consider upgrading via the ‘pip install --upgrade pip‘ command.

这个报错是应为没有安装python-devel造成的。安装一下这个软件即可
Centos:yum -y insatll python-devel

pip安装mysql_python报错

标签:however   tool   fat   with   direct   cto   ble   token   stat   

原文地址:http://blog.51cto.com/13447608/2280883

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!