Hi guys I’m facing a strange issue on windows, whe...
# questions
r
Hi guys I’m facing a strange issue on windows, where the kernels in jupyter lab instance keeps disconnecting. It would normally work for a while after restarting jupyter lab but the problem gets back after. Doesn’t seem to be a resource issue, as this happens when working on a light notebook. Wondering if anyone has encountered a similar issue? Thanks in advance.
1
n
Could u create a fresh environment and try install Kedro and Jupyter? It’s likely that there are some incompatible libraries acting weird.
Does it also not work with notebook or just lab?
r
Thanks Nok, creating a new environment actually helped. I was having that issue with Python 3.10, with a new environment in Python 3.9, the problem seemed gone for now. The only downside is the jupyter lab/notebooks using the new environment didn’t load the kedro ipython extras by default. So you do need to run %load_ext kedro.extras.extension.ipython in the first cell.
n
creating a new environment actually helped.
This indicates that it’s a very likely dependency issue. You need to run
kedro jupyter notebook
or
kedro jupyter lab
to recreate the Jupyter kernel, as this ties to your virtual environment. Depends on which version of kedro you are using, if you are using the older one you may need to delete the kernel first. A newer version of Kedro should do this automatically. I can’t remember which version exactly, probably starting from 0.18.2 or 0.18.3 Can you upgrade your kedro library version to solve this problem? If not, which version of Kedro are you using?
Side note: starting from
0.18.3
you should be able to use
%load_ext kedro.ipython
instead of the full module
r
Really appreciate your help and comments Nok. I’ve been using kedro 0.18.5. I have realised that “kedro jupyter lab” will recreate a kernel for me, so I don’t have to create one myself. Now my early kernel disconnecting issue seems to be gone.
n
Awesome, glad everything is resolved now. : )