There are several package manager for macOS: Homebrew, Homerrew Cask, Nix, pkgsrc, MacPort, Rudix, Anaconda and Fink among others.
- Some requires sudo access (MacPort) other do not (Homebrew).
- Some will install their packages in your home folder (Anaconda is in ~/anaconda3) while other will install them in one of the system folder (Homebrew is in /usr/local/Homebrew & MacPort is in /opt/local/).
- Some has more packages available than others: MacPort has around 20K packages while Homebrew has around 5K packages.
The way to achieve that goal is to edit your ~/.profile file and setup the package manager order in your PATH variable.
It is also a good idea to keep a record of what application is installed with which package manager.