jupyter / atom-notebook

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

Notebook-view doesn't work with jupyter installed in $HOME #25

Closed kain88-de closed 8 years ago

kain88-de commented 8 years ago

I followed the installation instructions for linux but I don't get it to use the notebook interface when I open .ipynb files. Instead they are opened in JSON mode.

It might be important to know that I have installed almost all my python packages in my home directory. So the jupyter script is in $HOME/.local/bin. I'm new to atom and have no idea if it will be able to look in $HOME/.local/bin as well for executables.

gnestor commented 8 years ago

Toggle the Developer Tools (CTRL+ALT+I) and watch the console as you try to open an ipynb file. It sounds like jupyter-notebook is exiting due to an exception...

kain88-de commented 8 years ago

Failed to require the main module of 'jupyter-notebook' because it requires an incompatible native module. Run apm rebuild in the package directory to resolve. Window load time: 1835ms /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details. ::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.

Looks like the extension isn't even loaded. Ok I could fix that by clicking on the red bug icon in the lower right corner (running apm rebuild in the package folder didn't help, but that has been reported elsewhere)

Good thing the notebook is now rendered correctly. But it complains that jupyter couldn't be spawned. This is likely because I have installed it at $HOME and atom doesn't pick up my personal configuration for $PATH (I set it as well in $HOME/.profile which should be picked up by most processes started by me).

A fix for me would be nice if you add a config option to tell the extension where I have installed jupyter.

gnestor commented 8 years ago

I added an option to set jupyter binary path: https://github.com/jupyter/atom-notebook/commit/8e616efa100b254e9c931b17249b5b377c0334df

kain88-de commented 8 years ago

Thanks for adding the option. But I still have the same problem that jupyter couldn't be spawned.

I entered the path (/heom/max/.local/bin) that is returned by which jupyter. I'm not sure if this matters but I'm running Linux.

gnestor commented 8 years ago

What is the exact error message that you're seeing?

Open the Developer Tools console and type process.env.PATH to confirm that your jupyter path is in there. If you don't see it, then add it and try opening a notebook. Report back what you find...

kain88-de commented 8 years ago

I get the following error message

'jupyter' could not be spawned. Is it installed and on your path? If so please open an issue on the package spawning the process.

Checking the path in the console gives.

process.env.PATH "/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:~/.local/bin"

As well what is the command that you use to start/connect to the jupyter notebook? It could still be that my jupyter installation isn't working correct.

gnestor commented 8 years ago

It sounds like your jupyter path is /heme/max/.local/bi, so try this in the console: process.env.path = process.env.path + ':/heme/max/.local/bi' and then try to open a notebook. If that doesn't work, try copying and pasting that to your init script and reloading Atom (command palette > Reload) and then try opening a notebook.

gnestor commented 8 years ago

@kain88-de Any luck?

kain88-de commented 8 years ago

@gnestor no luck. I can't even update the package currently because node-gyp rebuild fails. It is missing headers for to compile some c-functions (I'm a little bit surprised that I have to compile C-code to install some javascript). I'll reported the issue with the atom team.

gnestor commented 8 years ago

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

There is an issue with node-gyp and Python 3. Try explicitly setting the Python version PYTHON=python2 apm install.

gnestor commented 8 years ago

@kain88-de Still having problems?

kain88-de commented 8 years ago

After updating atom and jupyter the error has changed but still no luck installing the extension.

It now complains about an error with jupyter-js-utils.

gnestor commented 8 years ago

Ok good at least that correlates with another current issue: https://github.com/jupyter/atom-notebook/issues/32#issuecomment-184922403

kain88-de commented 8 years ago

I'll close this since the original issue has been resolved. Thanks