-
确认已经安装jupyter
pip3 install --upgrade pip pip3 install jupyter
- 找到jupyter的安装位置
pip3 show jupyter
得到类似下面的结果
➜ ~ pip3 show jupyter Name: jupyter Version: 1.0.0 Summary: Jupyter metapackage. Install all the Jupyter components in one go. Home-page: http://jupyter.org Author: Jupyter Development Team Author-email: jupyter@googlegroups.org License: BSD Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages Requires: notebook, ipywidgets, ipykernel, jupyter-console, qtconsole, nbconvert Required-by:
根据location,我们可以找到jupyter的位置
/Library/Frameworks/Python.framework/Versions/3.7/bin/
然后将这个位置添加到命令搜索的路径中。(要注意赋值的时候等号两边不要加空格)
vim ~/.zshrc (如果是bash,那就是.bashrc) 添加如下语句 export PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin/:$PATH
然后重载相关命令
source .zshrc
- 可以正式开始使用jupyter啦
jupyter notebook
网友评论