Environment version: Windows + python 2.7/3.5 coexistence
Use of Python is installed using EXE, default already has Pip and make sure path is set correctly, default installation Psutil 4.3.0
1: Use cmd to install 2.7 psutil
c:\> pip Install Psutil
2: Also use CMD to install 3.5 psutil
Default 3.5 is installed in C:\Program Files\python\python35\, while 3.5 pip is in C:\Program Files\python\python35\scripts\
cd C:\Program Files\python\python35\scriptspip Install Psutil
Validation: Testing with idle3.5
Import psutilpsutil.cpu_times () # output Scputimes (user=334.28125, system=183.984375, idle=4382.921875, interrupt=10.796875, dpc=8.078125)
Problem:
If you are prompted for a PIP version problem, you can use the following code to update, as well, depending on the path situation, the default may be version 2.7, you need to go into the 3.5 directory to update
python-m pip Install--upgrade pip
Installing Psutil 4.3.0 in Windows 10 with PIP