我正在尝试在 centos 中安装 psutil 并且同样因 gcc 错误而失败。我在这个论坛上提到了各种帖子,但没有一个有帮助。许多线程建议使用 pydev 但它已经存在于我的系统中
#sudo /opt/airwave/bin/pip install psutil
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_VERSION=543 -DPSUTIL_LINUX=1 -I/opt/airwave/include/python2.7 -c psutil/_psutil_common.c -o build/temp.linux-x86_64-2.7/psutil/_psutil_common.o
psutil/_psutil_common.c:9:20: error: Python.h: No such file or directory
psutil/_psutil_common.c:25: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
psutil/_psutil_common.c:31: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
psutil/_psutil_common.c:42: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
psutil/_psutil_common.c:57: error: expected …
Run Code Online (Sandbox Code Playgroud)