{ } Raw JSON

bundles / jupyter_client latest / jupyter_client / kernelspec / install_kernel_spec

function

jupyter_client.kernelspec:install_kernel_spec

source: /jupyter_client/kernelspec.py:444

Signature

def install_kernel_spec(source_dir: str, kernel_name: str | None = None, user: bool = False, replace: bool | None = False, prefix: str | None = None) → str

Summary

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.install_kernel_spec