To install the Python psutil module:
Tar zxvf psutil-2.0.0.tar.gzcd psutil-2.0.0python setup.py Install
Error:
running installrunning bdist_egg......psutil/_psutil_linux.c:12:20: error: python.h: No such file or directoryin file included from psutil/_psutil_linux.c :23:psutil/_psutil_linux.h:11: error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token......psutil/_psutil_linux.h:20: error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' tokenpsutil/_psutil_linux.c: in function ' Ioprio_get ':p sutil/_psutil_linux.c:50: warning: implicit declaration of function ' Syscall ' psutil/_psutil_linux.c: at top level:psutil/_psutil_linux.c:70: error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' * ' token......psutil/_psutil_linux.c:384: error: expected ' = ', ', ', '; ', ' asm ' or ' __attribute__ ' before ' psutilmethods ' psutil/_psutil_linux.c:421: error: expected specifier-qualifier-list before ' Pyobject ' psutil/_psutil_linux.c: In function ' init_psutil_linux ':p sutil/_psutil_linux.c:470: error: ' pyobject ' undeclared (first use in this function) psutil/_psutil_linux.c:470: error: ( each undeclared identifier is reported only oncepsutil/_psutil_linux.c:470: error: for each function it appears in.) psutil/_psutil_linux.c:470: error: ' module ' undeclared (first use in this function) psutil/_psutil_linux.c:470: warning: implicit declaration of function ' py_initmodule ' psutil/_psutil_linux.c:470: error: ' Psutilmethods ' undeclared (first use in this function) ERROR: COMMAND  ' GCC ' failed with exit status 1
Reason:
GCC package installed, missing Python-devel package
Solve:
Yum Install Python-devel-y
This article is from the "Secret Garden" blog, please be sure to keep this source http://3094526.blog.51cto.com/3084526/1873865
Install Python's psutil module times wrong: Error:command ' gcc ' failed with exit status 1