bundles / jupyter_client latest / jupyter_client / kernelspec / KernelSpecManager / install_kernel_spec
function
jupyter_client.kernelspec:KernelSpecManager.install_kernel_spec
Signature
def install_kernel_spec(self, source_dir: str, kernel_name: str | None = None, user: bool = False, replace: bool | None = None, prefix: str | None = None) → strSummary
Install a kernel spec by copying its directory.
Extended Summary
If kernel_name is not given, the basename of source_dir will be used.
If user is False, it will attempt to install into the systemwide kernel registry. If the process does not have appropriate permissions, an OSError will be raised.
If prefix is given, the kernelspec will be installed to PREFIX/share/jupyter/kernels/KERNEL_NAME. This can be sys.prefix for installation inside virtual or conda envs.
Aliases
jupyter_client.kernelspec.KernelSpecManager.install_kernel_spec