SciPy Recipes
上QQ阅读APP看书,第一时间看更新

Installing Homebrew

Homebrew is a package manager for macOS that makes it easier to install and remove software packages without interfering with system software that ships with the computer. It installs package files to the /usr/local directory and makes no changes to system folders. Although it is possible to install Python on the Mac from the source, using Homebrew considerably simplifies the setup process.

To install Homebrew, open a Terminal window and run the following command. Please note that the whole command should be typed in a single Terminal line:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Follow the on-screen instructions and confirm that you want to install Homebrew. Enter the administrative password for your computer if prompted. On a personal computer, this is usually the same as your login password.

To check that Homebrew was successfully installed, run the following command:

brew -v

This command outputs information about the current Homebrew installation, which looks like the following example:

Homebrew 1.1.13
Homebrew/homebrew-core (git revision c80e; last commit 2017-04-26)

If you get a similar message and no errors, Homebrew is properly installed.