Installation with Homebrew
brew install python installs the current Python 3 (the python@3.x formula) together with pip3. The interpreter lives in /opt/homebrew/bin/python3 on Apple Silicon and /usr/local/bin/python3 on Intel; check brew --prefix if the command is not found.
Virtual environments
Do not install project dependencies globally. Create a per-project environment with python3 -m venv .venv, activate it with source .venv/bin/activate, then use pip install. Deactivate with deactivate.
Managing multiple versions
If you need several Python versions, install pyenv (brew install pyenv) rather than stacking Homebrew formulae; it lets you pin a version per directory with a .python-version file.