Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
kain88-de opened this issue Dec 28, 2015 · 14 comments
Closed

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

kain88-de opened this issue Dec 28, 2015 · 14 comments

Comments

@kain88-de
Copy link

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
Copy link
Contributor

gnestor commented Jan 4, 2016

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
Copy link
Author

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
Copy link
Contributor

gnestor commented Jan 5, 2016

I added an option to set jupyter binary path: 8e616ef

@gnestor gnestor closed this as completed Jan 5, 2016
@kain88-de
Copy link
Author

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
Copy link
Contributor

gnestor commented Jan 6, 2016

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

@gnestor gnestor reopened this Jan 6, 2016
@kain88-de
Copy link
Author

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
Copy link
Contributor

gnestor commented Jan 10, 2016

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
Copy link
Contributor

gnestor commented Jan 11, 2016

@kain88-de Any luck?

@kain88-de
Copy link
Author

@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
Copy link
Contributor

gnestor commented Jan 11, 2016

See: #23

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

@gnestor
Copy link
Contributor

gnestor commented Feb 16, 2016

@kain88-de Still having problems?

@kain88-de
Copy link
Author

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
Copy link
Contributor

gnestor commented Feb 17, 2016

Ok good at least that correlates with another current issue: #32 (comment)

@kain88-de
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants