-
Notifications
You must be signed in to change notification settings - Fork 38
Python 3, ipywidgets 5.x and kernel names #73
Comments
Did you come around any fix? I have the exact same problem. Odd. |
No, I did not got deeper into the issue. I think this has something to do with different jupyter maintaining different list of kernels, but I did not manage to find clear information about that so far. |
This is a bug in the nb_conda_kernels package that is part of Anaconda, and fixed in more recent versions. Updating nb_conda_kernels should fix it. |
Great! Any idea on how to update? Lots of website on how to install, but Thanks, Mark On Fri, Sep 9, 2016 at 1:40 PM, Min RK [email protected] wrote:
|
I don't have time to test it right now, but what about:
(from https://groups.google.com/forum/#!topic/jupyter/qE6fCyXe6fs) |
I just got what seems to be the same issue. To reproduce, execute the three first cells of:
It briefly displays:
and the widgets are not displayed. This was working last week; I noticed the notebook on mybinder was using ipywidgets 4 back then, and now ipywidgets 5. This could be the result result from a change in my setup in the mean time (the repo is now a pip installable package). Any suggestion on how to fix this? I am happy adjusting my setup.py / requirements.txt. however, since using interacts is a common use case -- and assuming I have not done something stupid -- it would be nice to have them work out of the box. Thanks in advance! PS: the above repo is an experiment I did with a friend from earth-sciences; he was amazed by the jupyter+interact+mybinder technology for making his code accessible through interactive web-based forms. |
My code/repo https://github.com/humm/pvlv is using Python 3 and ipywidgets 5.x. This now requires to run
jupyter nbextension enable --py --sys-prefix widgetsnbextension
. Failing that, the widgets don't show nor work.When configuring with a simple requirements.txt file, jupyter 4.1.1 from python 2.7.11 is used, but it correctly launches a
Python 3
kernel for the notebooks. However, thejupyter nbextension enable --py --sys-prefix widgetsnbextension
command does not work, and widgets throw an error message.I tried to resolve this with a Dockerfile, but I could not figure out how to switch the entire image to Python 3 properly. I tried using
RUN /bin/bash -c "source activate python3"
, but this is only valid for this line: the nextRUN
command in the Dockerfile use the 2.7.11 python.I finally decided to mess with the path:
ENV PATH $HOME/anaconda2/envs/python3/bin/:$PATH
, which feels a bit icky, but it forces Python 3 on the entire image. And it works forpip
too. And...jupyter
. So the jupyter that runs the notebook is now the one of python 3.5. More precisely:This jupyter has somewhat different kernel names (
Python [Root]
andPython [python3]
), and seems unable to find a match for the notebook kernelspec, which leads to an annoying dialog:For reference, the kernelspec my notebook is asking for is:
So the issue is not that problematic, and quite involved. But I feel like there is a quick fix for the kernel matching somewhere. Does anyone with more familiarity with the kernelspec/ipykernel install/jupyter has any idea?
The text was updated successfully, but these errors were encountered: