How to Fix 'command not found' (Without Reinstalling Everything)
Adapted from the Command Line Essentials Companion Guide . You install something, open a fresh terminal, type the command, and get bash: python3: command not found — or on Windows, 'python3' is not recognized as an internal or external command . The installer said it finished successfully. You can probably even find the program in your applications folder. And yet the terminal insists it doesn't exist. The instinct at this point is usually to reinstall, or install a second copy from somewhere else, hoping one of them "takes." That almost never fixes it, because reinstalling doesn't address what's actually wrong. What the error is actually telling you When you type a command, the shell doesn't scan your whole computer looking for it. It checks a specific, ordered list of directories — stored in an environment variable called PATH — and stops at the first match it finds. command not found doesn't mean the program doesn't exist anywhere on your machine. It means none of the directories in that list happen to contain it. That distinction matters, because it splits into three genuinely different problems: A typo. gerp isn't a command; grep is. This is the most common cause by a wide margin, and the easiest to rule out first. It isn't installed at all. The program genuinely doesn't exist on this machine yet. It's installed, but not somewhere the shell is looking. This is the one that catches people off guard — the software is sitting on disk, correctly installed, just outside every directory PATH currently checks. Reinstalling only ever fixes cause 2. If your actual problem is 1 or 3, a second install just gives you a second copy of a program that was never the issue. The fix, step by step Check for a typo first. Read the command back character by character. It sounds too simple to be worth a step, but it resolves this error more often than everything else combined. Confirm whether it's installed at all , independent of whether the shell can currently find it: which pytho