Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to kill python from windows command prompt?

When my python script is done running code i want to be able to kill the python script from windows command line only and close everything that has to do with python

the python window remains open after all code has been executed even though I have included exit() at the end of my code

i have tried

taskkill /IM py.exe

ERROR: The process "py.exe" not found.

taskkill /IM myScript.exe

ERROR: The process "myScript.exe" not found.

i cannot find any python processes in task manager

can anyone help?

enter image description here

like image 200
dam1ne Avatar asked Jul 18 '26 10:07

dam1ne


1 Answers

taskkill /IM python.exe /F

This will force to kill the python.

like image 73
nurllah Avatar answered Jul 20 '26 02:07

nurllah