jupyter / atom-notebook

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

Failure to spawn 'jupyter' on mac os x 10.11.1 #17

Closed alexandercbooth closed 8 years ago

alexandercbooth commented 8 years ago

When opening a .ipynb file, the file opens in atom but I get the message: ''jupyter' could not be spawned. Is it installed and on your path?'

It is installed and in my path. I also noticed that when I have jupyter-notebook enabled, my hydrogen package also fails to spawn (but works well otherwise).

Installed Packages

Hydrogen 0.6.5 activate-power-mode 0.4.1 highlight-line 0.11.0 jupyter-notebook 0.0.4 minimap 4.16.2

atom version 1.4.0-dev-5825fb5

Thanks!

gnestor commented 8 years ago
  1. What do you see when you run which jupyter in the terminal? There is an issue with Atom and process.env.PATH on OS X that we are still trying to work out. If you launch Atom from the command line, you shouldn't encounter this error. We are trying to workaround this in the package.
  2. I would say that Hydrogen is trying to spawn it's own Jupyter server on the same port, but I just tested running a notebook in jupyter-notebook and also running some code using Hydrogen and both worked. Can you copy and paste the Hydrogen error message from the console inside Atom (CMD+OPTION+I)?
alexandercbooth commented 8 years ago

Hi Grant,

Thanks for getting back to me so quickly.

I launched atom from the command line and got the following:

1. running which jupyter: /Users/alexbooth/anaconda/bin/jupyter

2. Hydrogen error message: it does not copy when I press command + option + I, but it says in a red box: 'ipython' could not be spawned. I have attached a picture.

screen shot 2015-12-07 at 8 49 43 pm

Thanks again!

gnestor commented 8 years ago

Ok so it sounds like the fixPath function that we run when opening a notebook file is breaking your path vs. fixing it. https://github.com/jupyter/atom-notebook/issues/16 is a related issue regarding broken path on Windows. You can try to clone the fix-path branch and follow the "Developer" instructions or wait until we merge this branch (probably tomorrow). What I've found is that jupyter requires either /Users/grant/Library/Python/2.7/bin or /usr/local/bin be in the PATH (on my system). We manually add the following paths to process.env.PATH when you open a notebook file:

'/usr/local/bin',
'/usr/bin',
'/bin',
'/usr/local/sbin',
'/usr/sbin',
'/sbin'

It sounds like your jupyter is not available from these paths.

alexandercbooth commented 8 years ago

Hi Grant, I installed the fixPath branch and it now works perfectly (and so does hydrogen). Thanks so much, I truly appreciate it!

gnestor commented 8 years ago

Great! I will merge this branch and release a new version. Thanks for testing 👍