美文网首页
【到处是bug】zsh使用jupyter,command not

【到处是bug】zsh使用jupyter,command not

作者: 李庆文 | 来源:发表于2019-07-21 12:07 被阅读0次
  1. 确认已经安装jupyter

    pip3 install --upgrade pip
    pip3 install jupyter
    
    1. 找到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
    
    1. 可以正式开始使用jupyter啦
    jupyter notebook
    

相关文章

网友评论

      本文标题:【到处是bug】zsh使用jupyter,command not

      本文链接:https://www.haomeiwen.com/subject/saumlctx.html