Install Python's psutil module times wrong: Error:command ' gcc ' failed with exit status 1

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.