Bash: pip Command Not Found on Windows? Fix It
In this article
The short answer: pip is not found in Git Bash (or WSL) because the Windows Python installer does not add Python's Scripts folder to the PATH that bash reads. The fastest fix is to install Python from python.org with the "Add python.exe to PATH" box checked, then reopen Git Bash and run python -m pip --version. If Python is already installed, call pip through the interpreter (python -m pip install ...) or add the Scripts folder to PATH manually. This guide walks through both routes and the usual traps.
What You'll Need
- A Windows 10 or Windows 11 PC.
- Git for Windows (which provides Git Bash) or Windows Subsystem for Linux, if that is where you saw the error.
- Python installed from python.org or the Microsoft Store — not a random bundled copy from another application.
- Administrator rights if you plan to change system environment variables (a per-user PATH change does not need admin).
Step-by-Step
- Confirm which shell and which Python you actually have. Open the same terminal where you saw the error and run
which pythonandwhich python3. If both return nothing, Python is not on the PATH bash uses, and that is the root cause. If one returns a path, note it — you will use that interpreter below. Menu labels in Windows and in the Python installer can differ slightly by version and region, so match by meaning rather than exact wording. - Try the interpreter route first — it needs no PATH changes. In Git Bash run
python -m pip --version. If that prints a pip version, pip is installed and working; only the barepipcommand is missing from PATH. You can do everything withpython -m pip install package-namefrom here on. On WSL, usepython3 -m pip --version. - If
python -m pipsays pip is missing, install it through Python's own bootstrap. Runpython -m ensurepip --upgrade. This ships with CPython and installs pip into the same interpreter, so bash and Windows agree on where it lives. Then re-check withpython -m pip --version. - If Python itself is missing, install it properly. Download the current installer from python.org and run it. On the first installer screen, tick Add python.exe to PATH before clicking Install. This is the single step most people skip, and it is why
pipis not found later. The Microsoft Store version of Python also works and places its launcher on PATH, but avoid mixing Store Python and python.org Python on the same machine — pick one. - Close and reopen the terminal. PATH is read when a shell starts. Git Bash, Command Prompt and PowerShell will not see the new entry until you exit and relaunch them. This alone fixes many "still not found" reports after a fresh install.
- Add the Scripts folder to PATH manually if you kept an existing Python install. In Windows, open Settings and search for "environment variables" to reach the editor for your account (the exact wording varies by Windows version). Under your user variables, select Path, choose Edit, then New, and add the folder that contains pip. For a standard per-user python.org install that is
C:\Users\<YourName>\AppData\Local\Programs\Python\Python3xx\Scripts, where3xxmatches your installed version. Add the matching Python folder (without\Scripts) too ifpythonis also not found. Save, then reopen Git Bash. - Verify from bash, not just from Windows. Run
pip --versionandpython -m pip --version. Both should report the same version and the same Python path. If they disagree, you have two Pythons on PATH — remove the unwanted entry rather than adding more. - Use a virtual environment for real projects. In your project folder run
python -m venv .venv, then activate it from Git Bash withsource .venv/Scripts/activate. Inside an activated environment,pipresolves to that environment's copy, which sidesteps most global PATH confusion.
Common Mistakes
- Typing
pipin Git Bash after installing Python without ticking the PATH box. The installer finishes, but bash never learns about the Scripts folder. Re-run the installer, choose Modify, and enable the PATH option, or add the folder manually as in step 6. - Assuming Git Bash and Command Prompt share the same PATH. They read the same Windows environment variables, but a shell started before the change keeps the old copy. Always relaunch.
- Installing packages with
pipas Administrator into a system-wide Python and then wondering why a normal user session cannot import them. Prefer per-user installs and virtual environments. - Mixing the Microsoft Store Python with a python.org install. You end up with two
pip.exefiles and unpredictable results. Uninstall one. - Using
sudo pipinside WSL. That writes to the system Python and can break the distribution's package manager. Usepython3 -m venvinstead. - Confusing the error with a broken pip. "Command not found" is a PATH problem, not a pip problem. Do not reinstall pip repeatedly before checking PATH.
Tips
- Prefer
python -m pipin scripts and documentation. It always targets the interpreter you invoked, so it cannot pick up the wrong pip. - Run
where pythonin Command Prompt andwhich -a pythonin Git Bash to list every Python on PATH and spot duplicates. - Keep one Python per major project family. Virtual environments are cheap; PATH debugging is not.
- If you use WSL, install Python inside the Linux distribution (
sudo apt install python3 python3-pipon Debian-based distros) rather than calling the Windows copy — the two filesystems and interpreters are separate. - After any PATH edit, test in a brand-new terminal window before changing anything else.
Troubleshooting
If that did not work, work down this list in order, simplest first.
- Restart the terminal and, if needed, sign out and back in. Windows sometimes needs a fresh logon for environment changes to propagate to all processes.
- Check the folder actually contains pip. In File Explorer, open the Scripts folder you added and confirm
pip.exeis there. If it is not, pip is not installed for that interpreter — runpython -m ensurepip --upgrade. - Check for a typo or a stale entry. A PATH entry pointing at a Python version you uninstalled will silently fail. Remove it.
- Update pip once it is reachable:
python -m pip install --upgrade pip. This is safe and fixes some odd launcher behaviour. - Reinstall Python as a last resort. Uninstalling and reinstalling with the PATH option ticked is faster than chasing a corrupted install. Note that uninstalling removes packages installed into that interpreter — your project files are untouched, but reinstall dependencies afterwards.
- If the error appears only inside a specific IDE terminal, check that terminal's own shell settings; some editors launch a shell with a restricted environment.
Frequently Asked Questions
Why does pip work in Command Prompt but not Git Bash?
Usually because the shell was opened before the PATH change, or because Git Bash is reading a different PATH composition. Relaunch Git Bash and run which -a pip to see what it finds.
Is python -m pip the same as pip?
Functionally yes, when both point at the same interpreter. python -m pip is more reliable because it cannot pick up a pip belonging to a different Python installation.
Do I need to reinstall Python to fix this?
No. Adding the Scripts folder to PATH, or using python -m pip, fixes it without reinstalling. Reinstall only if the installation itself is damaged.
Why is pip still not found after I edited PATH?
The running shell keeps the environment it started with. Close every terminal window, open a new one, and test again.
Should I use pip inside WSL or the Windows Python?
Use the one that matches where your project lives. WSL projects should use the Linux Python and its pip; Windows projects should use the Windows Python. Mixing them causes permission and path problems.
Does this affect smart home tools like Home Assistant or ESPHome?
Yes, if you install such tools via pip on Windows. The same PATH rules apply, and a virtual environment per tool is the recommended way to keep them isolated.