Using nb_kernals with python 3.9 or higher
Closed this issue · 4 comments
I had issues using the installation commands in the README due to my python version. Maybe they should be updated? The following worked for me in the 'base' environment (the environment in which the user has Jupyter installed):
conda install -c conda-forge nb_conda_kernels
ATTENTION: The above seemed to initially fix the problem. Sadly now I am getting kernal error when opening Jupyter Notebook. Any feedback would be appreciated.
Here is the traceback from the Kernal Error:
return loop.run_until_complete(coro(*args, **kwargs))
File "/home/samuel/miniconda3/lib/python3.9/site-packages/nest_asyncio.py", line 70, in run_until_complete
return f.result()
File "/home/samuel/miniconda3/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
File "/home/samuel/miniconda3/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/home/samuel/miniconda3/lib/python3.9/site-packages/jupyter_client/manager.py", line 331, in _async_start_kernel
kernel_cmd, kw = await ensure_async(self.pre_start_kernel(**kw))
File "/home/samuel/miniconda3/lib/python3.9/site-packages/jupyter_client/utils.py", line 21, in wrapped
return loop.run_until_complete(coro(*args, **kwargs))
File "/home/samuel/miniconda3/lib/python3.9/site-packages/nest_asyncio.py", line 70, in run_until_complete
return f.result()
File "/home/samuel/miniconda3/lib/python3.9/asyncio/futures.py", line 201, in result
raise self._exception
File "/home/samuel/miniconda3/lib/python3.9/asyncio/tasks.py", line 256, in __step
result = coro.send(None)
File "/home/samuel/miniconda3/lib/python3.9/site-packages/jupyter_client/manager.py", line 293, in _async_pre_start_kernel
self.provisioner = KPF.instance(parent=self.parent).create_provisioner_instance(
File "/home/samuel/miniconda3/lib/python3.9/site-packages/jupyter_client/provisioning/factory.py", line 90, in create_provisioner_instance
raise ModuleNotFoundError(
ModuleNotFoundError: Kernel provisioner 'local-provisioner' has not been registered.
Did you try this before with python 3.8 or 3.7 and did it work?
This issue was addressed in jupyter/jupyter_client#692 and is available in jupyter_client >= 7.0.3 (7.1.0 is the current release).
As noted in the PR, this oddity can happen when there are multiple dist_info
directories associated with a given package. When the local-provisioner
entry-point is looked up, the entry-point software hits the older dist-info which, in this case, was produced prior to kernel provisioners and does not contain the entrypoint. So even though jupyter_client 7.x code was running, the entrypoint software was hitting a 6.x-based dist-info for juptyer_client and not finding the provisioner built into 7.x.
This issue should be closed. Sorry for the inconvenience.
@SamuelAdamsMcGuire Could you please close the issue as the comment above indicated that it had been resolved?
I'll be closing as resolved.