繁体   English   中英

无法运行 jupyter (Mac M1 Max)

[英]Cannot run jupyter (Mac M1 Max)

我在运行 OS 12.5 和 Python 3.10.4 的 Mac M1 Max 上。 我运行pip3 install jupyter并且安装顺利,但我收到警告

WARNING: The script jupyter-console is installed in '/Users/userXYZ/Library/Python/3.10/bin' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

显然我需要将/Users/userXYZ/Library/Python/3.10/bin添加到 PATH 中。

更新(在关注@csgeek 的评论之后)

之后,在 python 控制台中我运行

import sys
sys.path.insert(0,'/Users/userXYZ/Library/Python/3.10/bin')

该命令在没有可见 output 或错误的情况下运行,但是当我在终端中键入jupyter-lab时,我得到命令未找到。 另一方面,调用完整路径有效:

/Users/userXYZ/Library/Python/3.10/bin/jupyter-lab

因此我的问题是:

  1. 如何添加到 PATH?
  2. 如何检查 PATH 的内容以查看它是否已更新?
  3. 我从没有管理权限的帐户运行。 这有什么不同吗?

首先,我应该说,自从我最初的问题以来,我重新安装jupyter ,这次使用的是自制软件。 我在 zsh 上,所以我创建了文件.zshrc并添加了该行

export PATH="$PATH:/opt/homebrew/bin"

'echo $PATH` 现在显示

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/opt/homebrew/bin

jupyter notebook按预期运行。

对于 bash shell 我想该过程如@wjandrea的链接中所述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM