Notebook: PyCharm can't start kernel

Created on 30 Dec 2016  路  9Comments  路  Source: jupyter/notebook

When I upgraded to 4.3.1 and tried to work with a notebook from within PyCharm (community edition), it gives this error message:

/usr/bin/python3.4 /usr/local/bin/jupyter-notebook --no-browser --ip 127.0.0.1 --port 8889 --NotebookApp.token=''
[W 15:47:38.860 NotebookApp] All authentication is disabled. Anyone who can connect to this server will be able to run code.
[I 15:47:38.885 NotebookApp] Loading IPython parallel extension
[I 15:47:38.890 NotebookApp] Serving notebooks from local directory: /home/peter/code/projects/test
[I 15:47:38.890 NotebookApp] 0 active kernels
[I 15:47:38.890 NotebookApp] The Jupyter Notebook is running at: http://127.0.0.1:8889/
[I 15:47:38.890 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 15:47:39.742 NotebookApp] 403 POST /api/kernels (127.0.0.1): '_xsrf' argument missing from POST
[W 15:47:39.759 NotebookApp] 403 POST /api/kernels (127.0.0.1) 17.99ms referer=None

With 4.3.0 it works fine.

Most helpful comment

  1. if you dont have already: jupyter notebook --generate-config
  2. in C:\Users\...\.jupyter\jupyter_notebook_config.py uncomment c.NotebookApp.disable_check_xsrf = False for me its False for others it may be True
  3. run jupyter notebook --no-browser / ipython notebook --no-browserget the token from there

works for me:
Windows Version 10.0.17134.165
jupyter --verion 4.4.0
Python 3.6.5
Pycharm 2018.2 Professional Edition

All 9 comments

Disregard that, just received a PyCharm update that fixed it.

screen shot 2017-11-04 at 1 48 02 pm
This is happening even in the latest version (2017.2)

I am using PyCharm professional.. there was a work around to alter the .matplotlibrc config file.. but doing that was having issues with matplotlib library..

This has been an on going issue since the december 2016 release.. i dont know why it isnt fixed yet..

If you're having difficulty with Pycharm, you need to report it to Jetbrains - we're happy to provide information to them, but they have done all the Jupyter integration work themselves. We don't maintain that.

Please do ensure you're using up-to-date versions of Jupyter (pip install --upgrade notebook) and PyCharm before reporting bugs.

Jetbrains still hasn't fixed it.
https://youtrack.jetbrains.com/issue/PY-26089

  1. if you dont have already: jupyter notebook --generate-config
  2. in C:\Users\...\.jupyter\jupyter_notebook_config.py uncomment c.NotebookApp.disable_check_xsrf = False for me its False for others it may be True
  3. run jupyter notebook --no-browser / ipython notebook --no-browserget the token from there

works for me:
Windows Version 10.0.17134.165
jupyter --verion 4.4.0
Python 3.6.5
Pycharm 2018.2 Professional Edition

nice, @3zbumban's solution works.. with a minor point that you have to set the flag to True.

I had this error because I was copying the browser token rather than the token after the "The Jupyter notebook is running at" line

  1. if you dont have already: jupyter notebook --generate-config
  2. in C:\Users\...\.jupyter\jupyter_notebook_config.py uncomment c.NotebookApp.disable_check_xsrf = False for me its False for others it may be True
  3. run jupyter notebook --no-browser / ipython notebook --no-browserget the token from there

works for me:
Windows Version 10.0.17134.165
jupyter --verion 4.4.0
Python 3.6.5
Pycharm 2018.2 Professional Edition

I worked for me : c.NotebookApp.disable_check_xsrf = True

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikepqr picture mikepqr  路  3Comments

jonatanblue picture jonatanblue  路  3Comments

mowe96 picture mowe96  路  3Comments

Foadsf picture Foadsf  路  3Comments

fonnesbeck picture fonnesbeck  路  3Comments