Jupyter has 0 active kernels (Anaconda with Python

2019-04-14 14:55发布

问题:

I've installed Anaconda 2.5 w/Python 2.7. Upon launching jupyter (which is bundled in Anaconda), the python kernel isn't being detected.

The web server launches and listens on 8888. The browser notebook editor works fine. However, I can't run any python code. The "Cell" menu isn't appearing.

Is there a configuration file or something that needs to be installed?

Here's the output from the console:

[I 21:32:27.625 NotebookApp] Serving notebooks from local directory: C:\Users\smilesydney
[I 21:32:27.625 NotebookApp] **0 active kernels**
[I 21:32:27.625 NotebookApp] The Jupyter Notebook is running at: http://localhost:8888/
[I 21:32:27.627 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

回答1:

The default port 8888 is blocked, I think. For single launch this should help:

jupyter notebook --port=8889

To fix that permanently run:

jupyter notebook --generate-config

Then go to ./anaconda/ directory and add

c = get_config()
c.NotebookApp.port = 8889

to file jupyter_notebook_config.py



回答2:

I had the same issue. Reinstalling ipython solved the problem.



回答3:

Simply restart the jupyter notebook solved the problem for me.

If one restart doesn't help, restart it again.



回答4:

I fixed that through upgrading the Jupyter in Anaconda.

See https://github.com/jupyter/notebook/issues/2382 for more details.