-
Notifications
You must be signed in to change notification settings - Fork 444
Description
Right now, when calling execute_notebook, papermill requires either an explicitly specified kernel_name, or a kernelspec to be present in the notebook's metadata.
This complicates situations a) where we are writing notebooks that are compatible across the py2/py3 language barrier and b) where we are distributing notebooks to the public.
In the first case, if we specify either a python2 or python3 kernel in our notebooks, we will work out of the box (on a default install) on one Python version, but not on the other, even if the notebook is compatible. There are many workarounds, but all are burdensome and distracting.
In the second case, regardless of what kernel we specify in our notebooks, we are not guaranteed that it will be present in the environment to which we are distributing notebooks.
Granted that it is impossible to magically resolve these issues in general, does anyone see a strong downside to trying to infer a kernel when it is not specified, perhaps following the scheme in #262 (looking at the language), or perhaps looking at Jupyter settings such as MappingKernelManager.default_kernel_name (but cf. jupyter/notebook#3338)?