简体   繁体   English

juypter笔记本中的zsh无法识别任何命令

[英]zsh within juypter notebook not recognizing any commands

I have confirmed and ran it on my local terminal but it will not recognize any commands in juypter notebook for some reason...我已经确认并在我的本地终端上运行它,但由于某种原因它无法识别 juypter notebook 中的任何命令......

screenshot of error错误截图

  1. First, please confirm that jupyter has been installed correctly.首先,请确认 jupyter 已正确安装。
 pip3 install --upgrade pip pip3 install jupyter
  1. Find the installation location of jupyter找到jupyter的安装位置
pip3 show jupyter

You will get a result similar to the following您将得到类似于以下的结果在此处输入图像描述

According to location, we can find the location of jupyter根据位置,我们可以找到jupyter的位置

/Library/Frameworks/Python.framework/Versions/3.7/bin/
  1. Then add this location to the path searched by the command.然后将此位置添加到命令搜索的路径中。 (Be careful not to add spaces on both sides of the equal sign when assigning) (赋值时注意等号两边不要加空格)
 vim ~/.zshrc (or .bashrc if bash)
  1. Add the following statement添加以下语句
export PATH=/Library/Frameworks/Python.framework/Versions/3.7/bin/:$PATH
  1. Then reload the relevant command然后重新加载相关命令
source.zshrc
  1. Use jupyter使用 jupyter
 jupyter notebook

Hope this helps you希望这可以帮助你

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

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