brew install python

brew install python

This will install: - `python3` (latest version, M1/M2 native) - `pip3` (Python package manager)

Check versions:

python3 --version pip3 --version

1. Install `venv` for Virtual Environments** You already have it via Homebrew Python:

python3 -m venv ~/.venvs/ai

Activate it:

source ~/.venvs/ai/bin/activate

Now your terminal will show a virtual environment like this:

(ai) yourname@mac ~ %

From now on, any `pip install ...` installs packages *only* in that environment.