python 安裝psutil
阿新 • • 發佈:2018-08-08
install tps pypi 安裝python sta ges span this UNC
在使用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