1. 程式人生 > >安裝python模組psutil(Linux 環境)

安裝python模組psutil(Linux 環境)

cd python-ipypython setup.py install如果安裝是出現報錯error: command 'gcc' failed with exit status 1解決辦法yum install gcc python-devel重新安裝python setup.py install安裝成功執行的一些例項>>> import psutil>>> psutil.cpu_times()scputimes(user=19207.82, nice=88.010000000000005, system=31732.639999999999, idle=20690363.170000002, iowait=1414.04, irq=543.19000000000005, softirq=463.97000000000003, steal=0.0, guest=0.0)