pythonpython-3.xmacospiphomebrew

Why can't I upgrade pip3 version 24.0 to 24.2 if it is managed by Homebrew on my Mac M1 Pro - Sonoma 14.6.1?


Why can't I upgrade pip3 version 24.0 to 24.2 if it is managed by Homebrew on my Mac M1 Pro - Sonoma 14.6.1?

See images below:

enter image description here

enter image description here

Can't seem to upgrade pip3 if being externally managed by Homebrew. No matter the Terminal commands, it will not upgrade with Homebrew installed. If I update directly, with direct Python instillation, then it will.


Solution

  • [UPDATE]: Reading the comment I assumed you already did update && upgrade. If not then ->:

    brew update
    brew upgrade
    

    If Python is installed with Homebrew, pip3 is also managed by Homebrew then. This means that pip3 is upgraded only when you upgrade the entire Python package using Homebrew, rather than manually upgrading pip3 itself.

    On the other hand, if you try to upgrade pip3 manually as you try with pip install --upgrade pip, in that case, Homebrew might override it or conflict with the system's Python installation. This can cause the upgrade to not persist or result in using the wrong pip version or even Python.
    What to do? Hmm try: First check your version and PATH and ensure that the pip3 you are trying to upgrade is the one managed by Homebrew: which pip3

    brew upgrade python
    

    if it does not go as you expect then -> brew reinstall python or do as the image suggests -> Go with pyenv