“jupyter notebook”命令在 Linux 上不起作用

LoL*_*oLa 7 python pip python-3.x jupyter jupyter-notebook

我最近根据他们的说明在我的 Linux 机器(安装了 Python 3.6)上安装了 Jupyter Notebook :

python3 -m pip install --upgrade pip
python3 -m pip install jupyter
Run Code Online (Sandbox Code Playgroud)

然而,当我跑

jupyter notebook
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Error executing Jupyter command 'notebook': [Errno 2] No such file or directory
Run Code Online (Sandbox Code Playgroud)

如果我运行:

cd /usr/bin
ls -l | grep jupyter
Run Code Online (Sandbox Code Playgroud)

结果是:

-rwxr-xr-x 1 root root         397 Feb 20 00:29 jupyter
-rwxr-xr-x 1 root root         413 Feb 20 00:29 jupyter-migrate
-rwxr-xr-x 1 root root         423 Feb 20 00:29 jupyter-troubleshoot
Run Code Online (Sandbox Code Playgroud)

那里似乎没有“笔记本”脚本。

python3 -m pip list包括notebook 5.5.0在其输出中。

其他答案建议安装 Anaconda,但我现在想避免这样做。我只是好奇为什么它不起作用,因为安装说明非常简短明了。

我更希望了解问题,而不是快速解决问题。谢谢!

编辑:jupyter notebook现在似乎在再次重新启动 + 重新安装后正常工作。谢谢您的帮助。

Pit*_*tto 9

您的安装出现问题。

如果您想使用 pip,请尝试:

pip3 install --upgrade --force-reinstall --no-cache-dir jupyter
Run Code Online (Sandbox Code Playgroud)

如果这不起作用,请使用以下命令安装 Jupyter:

sudo apt install jupyter-notebook
Run Code Online (Sandbox Code Playgroud)