os kill process python code example Example 1: python kill process windows import os os.system("taskkill /im make.exe") Example 2: kill python pkill -9 python