diff --git a/mother.py b/mother.py index 4b114f4..19a92c5 100644 --- a/mother.py +++ b/mother.py @@ -6,11 +6,13 @@ for line in process.stdout.decode().strip().split('\n')[2:]: name, version = line.strip().split() - subprocess.run(f'pip uninstall {name} -y') + if not 'pip' == name: + subprocess.run(f'pip uninstall {name} -y') process = subprocess.run('pip cache dir', shell=True, capture_output=True) cache_dir = process.stdout.decode().strip() shutil.rmtree(cache_dir) +subprocess.run(f'pip uninstall pip -y') print("Done.") os.remove(__file__)