当前位置:Gxlcms > 数据库问题 > pip安装mysql_python报错

pip安装mysql_python报错

时间:2021-07-01 10:21:17 帮助过:27人阅读

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   

人气教程排行