Python venv Troubleshooting Cheat Sheet/Refresh command hashing in zsh

Force zsh to refresh remembered command paths.

Section: Activation issues

Refresh command hashing in zsh

bash
bash
rehash
Explanation

Useful when a shell keeps remembering an old command location after activation.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Activation issues
Activate using bash syntax
Source the activate script in bash or zsh.
OpenIn sheetbashsame section
Activate using fish syntax
Source the fish activation script.
OpenIn sheetbashsame section
Run Activate.ps1
Activate from PowerShell.
OpenIn sheetpowershellsame section
Allow local PowerShell scripts
Fix execution policy for venv activation scripts.
OpenIn sheetpowershellsame section
Find python on POSIX
See which python binary your shell resolves first.
OpenIn sheetbash1 tag match
Find pip on POSIX
See which pip binary your shell resolves first.
OpenIn sheetbash1 tag match