因为Mac系统自带Python2.7 所以我们开发要重新装Python3
直接运行下面就好
luohaotiandeMacBook-Pro:~ luohaotian$ which python
/usr/bin/python
luohaotiandeMacBook-Pro:~ luohaotian$ cd /usr/local/bin/
luohaotiandeMacBook-Pro:bin luohaotian$ ls
brewlz4perlthanksptardiffsvnrdump
cnpmlz4cpiconvptargrepsvnserve
corelistlz4catpl2pmshasumsvnsync
cpannodepod2htmlsplainsvnversion
enc2xsnpmpod2mansvnunlz4
encguessnpxpod2textsvnadminvue
h2phperlpod2usagesvnbenchvue-init
h2xsperl5.30.0podcheckersvndumpfiltervue-list
instmodshperlbugpodselectsvnfsfswebpack
json_ppperldocprovesvnlookxsubpp
libnetcfgperlivpptarsvnmucczipdetails
luohaotiandeMacBook-Pro:bin luohaotian$ python -V
Python 2.7.10
luohaotiandeMacBook-Pro:bin luohaotian$ brew search python3
==> Formulae
boost-python3 python3 python@3
luohaotiandeMacBook-Pro:bin luohaotian$ brew install python3
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
jdupes mk-configure==> Installing dependencies for python: gdbm and xz
==> Installing python dependency: gdbm
==> Downloading https://homebrew.bintray.com/bottles/gdbm-1.18.1.mojave.bottle.1
######################################################################## 100.0%
==> Pouring gdbm-1.18.1.mojave.bottle.1.tar.gz