Unfortunately this does not work anymore, you get the ipython.kernel error message replaced by ipython.parallel.
A less elegant way than the above is to change IPython / frontend / html / notebook / kernelmanager.py to line 273 from
kernel_id = self.kernel_for_notebook (notebook_id)
to
kernel_id = None for notebook_id in self._notebook_mapping: kernel_id = self._notebook_mapping[notebook_id] break
For Anaconda python, replace start_kernel with kernelmanager.py with
def start_kernel(self, kernel_id=None, path=None, **kwargs): global saved_kernel_id if saved_kernel_id: return saved_kernel_id if kernel_id is None: kwargs['extra_arguments'] = self.kernel_argv if path is not None: kwargs['cwd'] = self.cwd_for_path(path) kernel_id = super(MappingKernelManager, self).start_kernel(**kwargs) self.log.info("Kernel started: %s" % kernel_id) self.log.debug("Kernel args: %r" % kwargs) self.add_restart_callback(kernel_id, lambda : self._handle_kernel_died(kernel_id), 'dead', ) else: self._check_kernel_id(kernel_id) self.log.info("Using existing kernel: %s" % kernel_id) saved_kernel_id = kernel_id return kernel_id
and add
saved_kernel_id = None
higher
class MappingKernelManager(MultiKernelManager):
Real IPython gurus, please provide the correct fix. Many people who use laptops want to be able to share the kernel, which is natural because one laptop quickly gets too big to work with one complex application, so itβs easier to split the application into several laptops.
In addition, the guru, while you are listening, it would be nice to have the U-turn function, as in Mathematica, so that you can only view the part of the notebook that you care about, and you can reduce the rest.
Lars ericson
source share