[Python] Homebrew Python3 not taking precedence over macOS system Python despite PATH in...

Discussão em 'Python' iniciado por Stack, Setembro 2, 2025.

  1. Stack

    Stack Membro Participativo

    I'm trying to make the Homebrew-installed Python3 take precedence over the macOS system Python. I already added Homebrew to my PATH in ~/.zshrc:

    export PATH="$(brew --prefix)/bin:$PATH"


    Homebrew Python is installed (brew install python), but when I run python3 or python, the system Python is still being used.

    What I expected: python3 (and ideally python) to resolve to the Homebrew binary in /opt/homebrew/bin

    What actually happens: python3 resolves to /usr/bin/python3 (system Python)

    Why is my PATH change in ~/.zshrc not making Homebrew Python take precedence? What exact file should I edit for zsh on macOS so the Homebrew bin appears first in all shells? Anything else I should check or post to help debug?

    If useful: I’m on macOS , shell: zsh, hardware: Intel / Apple Silicon.

    Continue reading...

Compartilhe esta Página