通过pip或者源码安装psutil,都会提示缺少python.h头文件,错误提示如下:

...
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
...

  出现此错误的原因是没有安装python-devel,python开发包,如果是支持yum的系统,直接yum安装即可:

yum -y install python-devel

相关文章:

  • 2021-11-27
  • 2022-12-23
  • 2022-12-23
  • 2021-09-30
  • 2021-11-27
猜你喜欢
  • 2022-12-23
  • 2021-10-14
  • 2022-12-23
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
相关资源
相似解决方案