Jupyter Notebook - Cannot Connect to Kernel

后端 未结 10 1754
小蘑菇
小蘑菇 2021-02-20 02:21

I\'ve tried installing jupyter notebook using pip3 install jupyter. Every time i launch a new jupyter notebook, the notebook is unable to connect to the kernel. See screenshot b

10条回答
  •  星月不相逢
    2021-02-20 02:52

    I experienced a similar issue on my old PC converted into a Ubuntu 20.04 server, with Jupyterlab running under Jupyterhub. The issue appeared after installing Jupytext with the following command:

    python3 -m pip install jupytext --upgrade
    

    which non only installed Jupytext but also upgraded my system to Jupyterlab 2.2.9 and Jupyterhub 1.2.2 (among other packages updates).

    After that, running a cell containing the simple code:

    3 * 4
    

    under any python 3.6 kernel or even R 3.6 or 4.0 kernel left me with the status message:

    Kernel xxx connecting...

    but never completing the connection nor the simple computation.

    Neither re-installing Tornado to version 5.1.1., nor reinstalling ipywidgets, succeeded in solving the issue.

    But finally downgrading Jupyterlab and Jupyterhub to (approximately) the original version numbers worked for me:

    python3 -m pip install wheel jupyterhub==1.1.0 jupyterlab==2.1.0 ipywidgets
    

    According to the command outputs, the following packages versions were actually applied:

    Installing collected packages: wheel, jupyterhub
      Attempting uninstall: wheel
        Found existing installation: wheel 0.34.2
        Uninstalling wheel-0.34.2:
          Successfully uninstalled wheel-0.34.2
      Attempting uninstall: jupyterhub
        Found existing installation: jupyterhub 1.1.0
        Uninstalling jupyterhub-1.1.0:
          Successfully uninstalled jupyterhub-1.1.0
    Successfully installed jupyterhub-1.2.2 wheel-0.36.1
    

    And after restarting jupyterhub, all my kernels were working again.

提交回复
热议问题