pip - zsh:找不到命令: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 返回: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
错误重定向是可取的,因为否则您将收到大量有关不允许 cd 进入的目录的错误消息。
推荐阅读
- r - R:循环命令以求解在每次迭代中增加的数值变量,直到总和收敛到给定整数
- php - 当我尝试将 MySql 与 php 的 mysqli 连接时出现错误 500
- c++ - 使用 umount() 函数时出现无效参数错误
- javascript - gulp-babel 不产生任何输出文件或不能正常工作
- javascript - RxJS - 如何映射/切换 Subject Observable 并向每个发出的值添加平均计算?
- php - Mysqli 从命令行工作,但不能通过 HTML/浏览器工作
- android-studio - 当大小应用程序 1 GB 时反应本机关闭应用程序 - PDF 反应本机
- sql-server - 如何使用 SSISDB 数据库中的 T-SQL 获得与所有执行概览报告中显示的“使用的参数”完全相同的列表?
- c++ - CRTP - 危险的内存访问?
- node.js - NodeJS 输出未显示在 Visual Studio 2017 中