neolee / pilot

进入编程世界的第一课
589 stars 842 forks source link

zsh: command not found: jupyterlab #1499

Closed yingzi4755 closed 1 year ago

yingzi4755 commented 2 years ago

在pilot-student下输入pip3 list可以出现以下内容: jupyter-client 7.1.2 jupyter-core 4.9.1 jupyter-server 1.13.4 jupyterlab 3.2.8 jupyterlab-pygments 0.1.2 jupyterlab-server 2.10.3 但是输入jupyter lab命令时就会报zsh: command not found: jupyterlab,无法运行jupyter,劳烦老师和战友们帮忙看看,谢谢!!!

neolee commented 2 years ago

如果这些包都正常安装了,那么可能是系统搜索路径没设置好。

你需要详细告诉大家你的操作系统、你的 Python、pip、以及 JupyterLab 是如何安装的,否则帮不到你。

yingzi4755 commented 2 years ago

老师好,我的系统是MacBook Air (M1, 2020)。python -V是Python 2.7.18,python3 -V是Python 3.9.10。pip -V是zsh: command not found: pip。pip3 -V是pip 21.3.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)。可以运行python3 -m pip install --upgrade pip、pip3 install jupyterlab和brew install node无报错信息,但我总感觉没安装完就自己退出来了,执行brew install node最后显示Running 'brew cleanup node'...就退出了

neolee commented 2 years ago

那你执行 python3 -m jupyterlab 是啥结果?

yingzi4755 commented 2 years ago

报:/opt/homebrew/opt/python@3.9/bin/python3.9: No module named jupyterlab

xu-kai-xu commented 2 years ago

python3 -m IPython notebook

可以试试这个

https://blog.csdn.net/xuaho0907/article/details/89450169

yingzi4755 commented 2 years ago

报:/opt/homebrew/opt/python@3.9/bin/python3.9: No module named IPython

neolee commented 2 years ago

老师好,我的系统是MacBook Air (M1, 2020)。python -V是Python 2.7.18,python3 -V是Python 3.9.10。pip -V是zsh: command not found: pip。pip3 -V是pip 21.3.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)。可以运行python3 -m pip install --upgrade pip、pip3 install jupyterlab和brew install node无报错信息,但我总感觉没安装完就自己退出来了,执行brew install node最后显示Running 'brew cleanup node'...就退出了

几个问题:

  1. 你可以学习下如何在这里贴代码和命令行结果,比如写成这样就会容易看很多:
    ❯ pip3 -V
    pip 22.2.2 from /opt/homebrew/lib/python3.10/site-packages/pip (python 3.10)
  2. 你说“pip3 install jupyterlab 和 brew install node 无报错信息,但我总感觉没安装完就自己退出来了”,那么到底是怎样的情况呢?因为你是新手,没有经验,可能计算机告诉你的一些信息很重要但被你忽略了,所以提问时需要完整的现场信息,不管你理解不理解都应该完整发出来,所以你执行下面的命令完整的交互信息怎样?
    pip3 uninstall jupyterlab
    pip3 install jupyterlab
  3. 你执行 jupyter lab 为啥会得到 zsh: command not found: jupyterlab 的信息?你运行的命令是 jupyter 不是 jupyterlab,空格后面的 lab 是个参数而已,所以你执行 jupyter lab 之后到底得到的信息是什么?以及你运行 python3 -m jupyter 的结果是什么?