1,安装psutil pip install psutil 如果pip不识别,就进入下载的python目录下面执行:。。。Python36\Scripts2,获取信息代码 import psutil;for proc in psutil.process_iter(): print("pid-%d,name:%s" % (proc.pid,proc.name()))