jupyter / atom-notebook

[Deprecated] Jupyter Notebook, but inside Atom.
MIT License
306 stars 48 forks source link

`No running Jupiter session` error #29

Closed fonnesbeck closed 8 years ago

fonnesbeck commented 8 years ago

Having installed atom-notebook successfully, I am unable to run cells. I get the following when executing a cell:

No running Jupyter session. Try closing and re-opening this file.

I am using Jupyter installed via Anaconda, and jupyter is on my path in ~/anaconda3/bin/jupyter. Running on OS X 10.11.2 and Python 3.5.1.

gnestor commented 8 years ago

Here is the offending line: https://github.com/jupyter/atom-notebook/blob/f185c49f646f15db2371e4307ac493c232c85d12/lib/notebook-editor.js#L180

See https://github.com/jupyter/atom-notebook/issues/25

Assuming that the cause is jupyter missing from your path:

  1. Open jupyter-notebook settings (Command Palette > Installed Packages > jupyter-noteboook > Settings) and set your path to ~/anaconda3/bin/jupyter
  2. Try opening a notebook
  3. If that doesn't work, you can add your jupyter path to your Atom path in your init script (Command Palette > Init Script): process.env.PATH = process.env.PATH + ':~/anaconda3/bin/jupyter'
  4. Reload Atom (Command Palette > Reload)
  5. Try opening a notebook
  6. If that doesn't work, try opening Atom from your project directory in the command line: atom .
  7. If that doesn't work, check the console in Atom's Developer Tools. Share any other errors or stack traces that you see there.

I'm not sure if ~/ will fly in the path, so try using the absolute path: /Users/grant/...

fonnesbeck commented 8 years ago

Right, I had opened Atom from the command line, and so I assumed that it would use my PATH (that contained the Anaconda bin directory). Adding the path manually to the settings did work, however. Thanks.

gnestor commented 8 years ago

👍

jd-lara commented 8 years ago

I have the same problem and already tried all the fixes shown. I also tried starting the jupyter - session manually and is not working. I have updated atom, jupyter, etc.

I am using python 2.7 in a mac. I have updated the path to the default one, however, I still get that jupyter is not running. "No running Jupyter session. Try closing and re-opening this file"

I have also checked the solution to #36 without sucess.

The output in the console when I open the file is:

kernelGateway.stderr [KernelGatewayApp] The Jupyter Kernel Gateway is running at: http://localhost:8894

notebook-editor.js:262 Kernel: undefined notebook-editor.js:258 kernelGateway.stderr INFO:tornado.access:200 GET /api/kernelspecs?1458085502357 (127.0.0.1) 349.47ms

The output of the console when I check the working path process.env.PATH "/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:./node_modules/.bin:/usr/local/lib:/Users/jdlara/Library/Jupyter/:/Library/Python/2.7/site-packages/"

amodig commented 7 years ago

I also have this issue. I'm using conda python 3.6 on a Mac. I did all the tricks @gnestor suggested here and in solution #36. The notebook runs fine with $ jupyter notebook test.ipynb.

The output in the console when I open the file is:

NotebookEditor created for /Users/amodig/git/python/notebooks/test.ipynb
kernelGateway.stderr [KernelGatewayApp] Jupyter Kernel Gateway at http://localhost:8902
gnestor commented 7 years ago

This repo is not being actively maintained 🙁 I suggest that you look at nteract, which is a Jupyter notebook client built using Electron (the same native app shell that is used by Atom), React, Redux, RxJS, etc. and it has a lot of momentum. It goes without saying that you also have Jupyter Notebook and its WIP successor JupyterLab.

Having said that, nteract is currently extracting its many components into separate packages which will allow them to be reused and assembled to create new apps. When I have the time, I would like to use them to completely refactor this project.

amodig commented 7 years ago

@gnestor OK thank you!

I just found out hydrogen, which seems to be a very powerful tool, bringing REPL features to regular Python. I only hope I can convince my data scientist team to start using Atom. :) We may also consider using nteract when sharing out our work. Thanks for mentioning JupyterLab, I didn't know about that!

Gigithecode commented 5 years ago

Same here... after trying all the tricks. The output of the console is :

NotebookEditor created for /home/gigi/Téléchargements/01_Lesson01_sourceSink.ipynb

Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=Fenix' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'".

Refused to load the stylesheet 'http://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400,500,700,800,900,100italic,300italic,400italic,500italic,700italic,800italic,900italic' because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline'".

kernelGateway.stderr [KernelGatewayApp] Jupyter Kernel Gateway at http://localhost:8899