how to force to remove a directory in python running by another process code example Example: python dlete folder import shutil shutil.rmtree('/folder_name')