![](/img/trans.png)
[英]How can I run Jupyter Notebooks in Visual Studio Code on M1 Mac with Rosetta
[英]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
因此我的问题是:
首先,我应该说,自从我最初的问题以来,我重新安装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.