【问题标题】:zsh: command not found: jupyterzsh:找不到命令:jupyter
【发布时间】:2020-05-14 20:35:36
【问题描述】:

我用 pip3 安装了 juypter。这是pip3 show Jupiter的输出:

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: /Users/myuser/Library/Python/3.8/lib/python/site-packages
Requires: notebook, ipywidgets, ipykernel, qtconsole, nbconvert, jupyter-console
Required-by: 

which python3which pip3输出:

/usr/local/bin/python3
/usr/local/bin/pip3

当我输入任何Jupiter 命令时,zsh 返回:command not found: jupyter

我读到我已经修改了我的 §PATH 变量。

我尝试将其更改为两者

export PATH=/Users/myuser/Library/Python/3.8/lib/python/site-packages
export PATH=/Users/myuser/Library/Python/3.8

如果我在 Finder 中搜索“Jupyter”,我可以找到例如 jupyter-notebook exec 并运行它。

如何从终端使用 Jupyter 命令?

【问题讨论】:

    标签: pip jupyter zsh


    【解决方案1】:

    您编写的两个 PATH 定义都没有意义,因为您已从 PATH 中删除了标准目录。您需要找到可执行文件juypter 所在的目录,然后将该目录添加到您的PATH。这与您希望通过 PATH 执行的任何其他程序的过程相同。

    作为替代方案,您始终可以通过显式指定路径来调用juypter

    /path/to/your/installed/file/juypter
    

    如果你不知道pip把你的文件放在了哪个目录,你可以试试

    find / -name juypter 2>/dev/null
    

    错误重定向是可取的,否则你会收到很多关于目录find is not allowed to cd into.的错误消息。

    【讨论】:

      猜你喜欢
      • 2021-12-05
      • 2019-11-25
      • 2016-07-30
      • 2015-07-01
      • 2017-08-09
      • 2016-04-12
      • 2016-06-26
      • 2021-12-15
      相关资源
      最近更新 更多