nwhitehead / pineapple

http://nwhitehead.github.io/pineapple/
Other
352 stars 26 forks source link

Kernel Error (Pineapple-Pro-0.7.4) Python 2.7 #32

Closed chrisidefix closed 8 years ago

chrisidefix commented 8 years ago

I am seeing the following Kernel Error when starting Pineapple.

Not sure if it is related (probably?), but some of the features are not functional. For example: I can not adjust the Theme (nothing happens when clicking on those menu items)

Traceback (most recent call last):
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/notebook/base/handlers.py", line 436, in wrapper
    result = yield gen.maybe_future(method(self, *args, **kwargs))
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/notebook/services/sessions/handlers.py", line 56, in post
    model = sm.create_session(path=path, kernel_name=kernel_name)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/notebook/services/sessions/sessionmanager.py", line 66, in create_session
    kernel_name=kernel_name)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/notebook/services/kernels/kernelmanager.py", line 84, in start_kernel
    **kwargs)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/jupyter_client/multikernelmanager.py", line 109, in start_kernel
    km.start_kernel(**kwargs)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/jupyter_client/manager.py", line 239, in start_kernel
    **kw)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/jupyter_client/manager.py", line 186, in _launch_kernel
    return launch_kernel(kernel_cmd, **kw)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/site-packages/jupyter_client/launcher.py", line 119, in launch_kernel
    proc = Popen(cmd, **kwargs)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/subprocess.py", line 672, in __init__
    errread, errwrite)
  File "/Users/chris/dev/apps/Pineapple-ProPy27.app/Contents/Resources/python2.7/lib/python2.7/subprocess.py", line 1201, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
nwhitehead commented 8 years ago

Not sure what's happening there. I think this might be related to running a different version of python as a kernel. Weird things can happen if you have previously set up IPython/Jupyter with customized versions of python. It looks like the internal python is being used to start the notebook server, but there is a problem starting the default kernel.

To fix these kinds of problems I made a change so that Pineapple uses different directories for configuration. That way everyone should get the correct default behavior when they first start Pineapple, and still allows experimenting with customization just for Pineapple (adding new kernels, etc.) Let me know if this is still a problem in releases 0.7.6 and up.

chrisidefix commented 8 years ago

Thanks, yes you are right, it's somewhat related to me messing up my (previous) IPython/Jupyter installation, which now is throwing the same error. I do think, as you said Pineapple shouldn't really be affected by this, though. I'll test again later, but probably will have to fix this issue on my machine in the mean-time.

It seems you are only tagging main release versions. I would probably recommend to tag every minor version as well (for example there is a tag for 0.7, but not for 0.7.4). Anyway, great project!

nwhitehead commented 8 years ago

Thanks for investigating. With the change to different configuration directories I think many of these issues will be fixed in the next release. Reopen if you see the same issue in the next release.

Good point, I should tag with the full v0.7.4. Will do going forward.

chrisidefix commented 8 years ago

Just wanted to report that I fixed my issue with ipython, but Pineapple is still not working properly. The actual problem was related to my python2 installation moving to a different location and me not updating that change in the actual kernel files. Well, I didt update it in the right Kernel files... apparently under OS X ipython loads the kernel files from ~/Library/Jupyter and not from ~/.ipython, but nevermind. ipython notebook now works as it should again, but inside Pineapple the kernel immediately dies now. Before it showed Kernel Error (in red), now the kernel seems to start and I get a Connected notification, but then it immediately dies within seconds and I get the Dead kernel notification with the options Try restarting now or Don't restart.