将 Ubuntu 从 16.10 升级到 17.04 后,内核在 Jupyter Notebook 中死亡

将 Ubuntu 从 16.10 升级到 17.04 后,内核在 Jupyter Notebook 中死亡

我最近将 Ubuntu 从 16.10 升级到了 17.04。启动 Jupyter Notebook 时内核死机。

注意:我没有使用 Conda 安装 Jupyter Notebook。谢谢

答案1

只需更新你的 jupyter,它就可以工作。

例如:如果你使用 pip 安装它,请运行以下命令:

pip install --upgrade jupyter --user

或者

sudo pip install --upgrade jupyter

答案2

或者,以下对我有用

sudo -H pip3 install --upgrade pip
sudo -H pip3 install jupyter

尽管我从头安装了 17.04,并且之前也以同样的方式安装了 jupyter。

仅供参考
Python 3.5.3
IPython 6.0.0
jupyter 4.3.0
Google Chrome 58.0.3029.81

答案3

还有另一种方法可以解决这个问题,它还有一个额外的好处,就是可以通过软件更新程序自动更新,因为 Jupyter Notebook 位于 Ubuntu 17.04 中的默认 Ubuntu 存储库中。运行以下命令。

在 Ubuntu 17.04 和 17.10 中打开终端并输入:

sudo pip uninstall jupyter
sudo apt install jupyter-notebook jupyter jupyter-core python-ipykernel

在 Ubuntu 18.04-19.10 中打开终端并输入:

sudo apt install python3-notebook jupyter jupyter-core python-ipykernel 

在 Ubuntu 20.04 及更高版本中打开终端并输入:

sudo apt install jupyter-notebook jupyter # python-ipykernel is dropped from the default Ubuntu repos

python-ipykernel 是运行 Jupyter Notebook 中的 Python 2.x 程序所必需的,否则它仅支持 Python 3.x。

要启动笔记本服务器,请运行以下命令:

jupyter notebook

您应该会看到 Jupyter Notebook 在您的网络浏览器中打开。

相关内容