centos7.2 系统安装psutil报错:error: command ‘gcc‘ failed with exit status 1 解决方法
文章目录
- 今天安装发现报错psutil:
- 解决方案:
今天安装发现报错psutil:
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
解决方案:
可以尝试安装:
# python2
yum install python-devel
# python3
yum install python3-devel
我是python3 使用下面的,安装之后就解决了。
然后安装就成功了:
pip3 install psutil
还没有评论,来说两句吧...