jupyter / notebook

Jupyter Interactive Notebook
https://jupyter-notebook.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
11.73k stars 4.97k forks source link

PyCharm can't start kernel #2017

Closed peter-ch closed 7 years ago

peter-ch commented 7 years ago

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.

peter-ch commented 7 years ago

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

akskuchi commented 7 years ago

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

SivaGabbi commented 7 years ago

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..

takluyver commented 7 years ago

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.

lovelyjuice commented 6 years ago

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

3zbumban commented 6 years ago
  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

bitmanlger commented 6 years ago

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

achatrian commented 6 years ago

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

mayank-givemefive commented 4 years ago
  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