【异常】airflow-psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory

1 异常信息

usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o
    psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory
     #include <Python.h>
                        ^
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-cbzrz90y/psutil/setup.py'"'"'; __file__='"'"'/tmp/pip-install-cbzrz90y/psutil/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
'"'"', '"'"'
'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-gb02py_w/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

解决方案


没有安装python3-devel包 导致报错
yum -y install python3-devel

原文地址:https://www.cnblogs.com/QuestionsZhang/p/11893058.html