$ brew install python3
Updating Homebrew...
Warning: python 3.7.7 is already installed, it's just not linked
You can use `brew link python` to link this version.
若未安裝則會執行相關安裝,已安裝則提示未連接 3. 連接python
$ brew link --overwrite python
Linking /usr/local/Cellar/python/3.7.7... 28 symlinks created
通過pip安裝Jupyter Notebook
查看python3版本
$ python3 -V
Python 3.6.7
安裝pip
$ sudo easy_install pip
Password:
Searching for pip
Reading https://pypi.org/simple/pip/
Downloading https://files.pythonhosted.org/packages/fe/3b/0fc5e63eb277d5a50a95ce5c896f742ef243be27382303a4a44dd0197e29/pip-20.2b1-py2.py3-none-any.whl#sha256=b4e230e2b8ece18c5a19b818f3c20a8d4eeac8172962779fd9898d7c4ceb1636
Best match: pip 20.2b1
Processing pip-20.2b1-py2.py3-none-any.whl
Installing pip-20.2b1-py2.py3-none-any.whl to /Library/Python/2.7/site-packages
Adding pip 20.2b1 to easy-install.pth file
Installing pip script to /usr/local/bin
Installing pip3.8 script to /usr/local/bin
Installing pip3 script to /usr/local/binInstalled /Library/Python/2.7/site-packages/pip-20.2b1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
更換pip源至國內阿里云的源(也可選擇其它源)
$ pip3 config set global.index-url https://mirrors.aliyun.com/pypi/simple/
Writing to /Users/nd/.config/pip/pip.conf