码迷,mamicode.com
首页 > 编程语言 > 详细

python 安装psutil

时间:2018-08-08 17:30:48      阅读:677      评论:0      收藏:0      [点我收藏+]

标签:inux   declare   dev   fail   object   implicit   only   lis   error   

在使用python组件psutil时需要先安装,具体如下:

 

    wget https://pypi.python.org/packages/source/p/psutil/psutil-2.0.0.tar.gz
    tar -xzvf psutil-2.0.0.tar.gz
    cd psutil-2.0.0
    python setup.py install

安装的过程中可能报错如下:

psutil/_psutil_linux.c:421: error: expected specifier-qualifier-list before ?.yObject?
psutil/_psutil_linux.c: In function ?.nit_psutil_linux?.
psutil/_psutil_linux.c:470: error: ?.yObject?.undeclared (first use in this function)
psutil/_psutil_linux.c:470: error: (Each undeclared identifier is reported only once
psutil/_psutil_linux.c:470: error: for each function it appears in.)
psutil/_psutil_linux.c:470: error: ?.odule?.undeclared (first use in this function)
psutil/_psutil_linux.c:470: warning: implicit declaration of function ?.y_InitModule?
psutil/_psutil_linux.c:470: error: ?.sutilMethods?.undeclared (first use in this function)
error: command gcc failed with exit status 1

报错原因为没有安装python-devel导致,直接yum安装即可。

 

python 安装psutil

标签:inux   declare   dev   fail   object   implicit   only   lis   error   

原文地址:https://www.cnblogs.com/aity007/p/9443935.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!