install IPython kernel with proper API

not deprecated API
This commit is contained in:
Min RK 2015-05-29 12:29:28 -07:00
parent ac5f6c1713
commit 33b458d960

View File

@ -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):