CentOS7 -- 64 install python's psutil module, centos7 -- 64 psutil
1. log on to CentOS as root and execute the following commands in sequence:
Wget https://pypi.python.org/packages/source/p/psutil/psutil-2.1.3.tar.gz
Tar zxvf psutil-2.1.3.tar.gz
Cd psutil-2.1.3/
Python setup. py install
2. When executing the last installation command of the preceding command, the following problems are encountered:
This prompt indicates that the python-dev dependency environment is missing. The solution is to install the corresponding environment. Run the following command to install the python-dev environment:
Yum-y install python-devel.x86_64
3. After installing the python-dev environment, run the python setup. py install installation command again. Inspection successful:
PS: psutil-pids () is used to list all processes (here it is only used to check whether Python's psutil module has been installed successfully !)