zsh:找不到命令:jupyter
zsh: command not found: jupyter
我用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 python3
和 which pip3
输出:
/usr/local/bin/python3
/usr/local/bin/pip3
当我键入任何 Jupiter
命令时 zsh returns: 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 命令?
你写的两个 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.
我用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 python3
和 which pip3
输出:
/usr/local/bin/python3
/usr/local/bin/pip3
当我键入任何 Jupiter
命令时 zsh returns: 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 命令?
你写的两个 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.