mirror of
https://github.com/jupyter/notebook.git
synced 2024-12-21 04:10:17 +08:00
install IPython kernel with proper API
not deprecated API
This commit is contained in:
parent
ac5f6c1713
commit
33b458d960
@ -978,12 +978,12 @@ class NotebookApp(JupyterApp):
|
|||||||
self.kernel_spec_manager.get_kernel_spec(NATIVE_KERNEL_NAME)
|
self.kernel_spec_manager.get_kernel_spec(NATIVE_KERNEL_NAME)
|
||||||
except NoSuchKernel:
|
except NoSuchKernel:
|
||||||
try:
|
try:
|
||||||
import ipykernel
|
from ipykernel.kernelspec import install
|
||||||
except ImportError:
|
except ImportError:
|
||||||
self.log.warn("IPython kernel not available")
|
self.log.warn("IPython kernel not available")
|
||||||
else:
|
else:
|
||||||
self.log.warn("Installing IPython kernel spec")
|
self.log.warn("Installing IPython kernel spec")
|
||||||
self.kernel_spec_manager.install_native_kernel_spec(user=True)
|
install(kernel_spec_manager=self.kernel_spec_manager, user=True)
|
||||||
|
|
||||||
|
|
||||||
def init_server_extensions(self):
|
def init_server_extensions(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user