pythonmacoshomebrew

Assign dependencies python version while brew installing


I want to install autojump via brew install autojump, which need to install python@3.9 as dependency. I already have python@3.8 installed via brew and don't want an another version.

python@3.8 also works with autojump. How can I keep python@3.8 around?


Solution

  • Impossible, that's not how Homebrew works.

    Installing autojump with homebrew is basically

    1. Creating a virtual environment with Python@3.9 (Homebrew always chooses the latest Python)
    2. Install autojump package in that environment.

    Unless you modify the autojump homebrew formula, You can't reuse python@3.8.