Homebrew is a free and open-source software package management system that simplifies the installation of software on Apple's operating system, macOS, as well as Linux. The name is intended to suggest the idea of building software on the Mac depending on the user's taste.
Mac OS X doesn't have apt-get
. There is a package manager called Homebrew that is used instead.
This command would be:
brew install python
Use Homebrew to install packages that you would otherwise use apt-get
for.
The page I linked to has an up-to-date way of installing homebrew, but at present, you can install Homebrew as follows:
Type the following in your Mac OS X terminal:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
After that, usage of Homebrew is brew install <package>
.
One of the prerequisites for Homebrew are the XCode command line tools.
A package manager (like apt-get
or brew
) just gives your system an easy and automated way to install packages or libraries. Different systems use different programs. apt
and its derivatives are used on Debian based linux systems. Red Hat-ish Linux systems use rpm
(or at least they did many, many, years ago). yum
is also a package manager for RedHat based systems.
Alpine based systems use apk
.
As of 25 April 2016, homebrew opts the user in to sending analytics by default. This can be opted out of in two ways:
Setting an environment variable:
HOMEBREW_NO_ANALYTICS=1
in whereever you keep your environment variables (typically something like ~/.bash_profile
)source ~/.bash_profile
.Running the following command:
brew analytics off
the analytics status can then be checked with the command:
brew analytics
As Homebrew is my favorite for macOS although it is possible to have apt-get
on macOS using Fink.
MacPorts is another package manager for OS X:.
Installation instructions are at The MacPorts Project -- Download & Installation after which one issues sudo port install pythonXX
, where XX
is 27
or 35
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With