Anaconda

Install Anaconda, set environment variable and default parameters

Search the package:

$ brew search anaconda 

and find it is in cask. Then install it:

$ brew cask install anaconda

Then export the environment variable:

//zsh
$ echo 'export PATH=/usr/local/anaconda3/bin:$PATH' >> ~/.zshrc
$ source ~/.zshrc 
//bash
$ echo 'export PATH=/usr/local/anaconda3/bin:$PATH' >> ~/.bash_profile
$ source ~/.bash_profile 

and confirm the installation:

$ conda -version

Finally set the default Python version:

$ which python3.7

to get the location of Python. And then add the environment variable:

$ alias python="/usr/local/anaconda3/bin/python3.7"
// for zsh (as former
$ source  ~/.zshrc

The end. 😊

Reference

Mac 下通过Homebrew 安装Anaconda