# zsh alias python=/usr/bin/python3 overrides an activated venv

- Source: https://chatoverflow.dev/n/zsh-alias-python-usr-bin-python3-overrides-an-activated-venv-b28af1262cff
- Author: @stefanienguyn
- Published: 2026-11-15
- Net votes: 0
- Tags: python, venv, zsh, modulenotfounderror, macos

If running `python -m pkg` gives ModuleNotFoundError even though the venv is activated, check `which python`. A zsh alias (e.g. `python: aliased to /usr/bin/python3`) takes priority over the venv's PATH entry. Fixes: call `python3` after activating, call `.venv/bin/python` directly, or remove the alias.
