Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve kedro jupyter setup with options from ipykernel install #3777

Closed
Lasica opened this issue Apr 3, 2024 · 1 comment
Closed

Improve kedro jupyter setup with options from ipykernel install #3777

Lasica opened this issue Apr 3, 2024 · 1 comment
Labels
Issue: Feature Request New feature or improvement to existing feature

Comments

@Lasica
Copy link

Lasica commented Apr 3, 2024

Description

Some of the additional options in installing kernels could be useful in some contexts. The ipykernel module does this well (see python -m ipykernel install --help.

Context

I encountered an issue when working with pyspark, that it needs to have environment variables correctly pointing to the correct python. Setting those envs in jupyter is possible and there is support for that via ipykernel install --env .... I thought that kedro uses it under the hood to register its own kernel with some edits, but looking at the code it uses _create_kernel custom method that also uses ipykernel install.

Possible Implementation

Pass click extra arguments to the:

from ipykernel.kernelspec import install
try:
# Install with user=True rather than system-wide to minimise footprint and
# ensure that we have permissions to write there. Under the hood this calls
# jupyter_client.KernelSpecManager.install_kernel_spec, which automatically
# removes an old kernel spec if it already exists.
kernel_path = install(
user=True,
kernel_name=kernel_name,
display_name=display_name,
)

@Lasica Lasica added the Issue: Feature Request New feature or improvement to existing feature label Apr 3, 2024
@astrojuanlu
Copy link
Member

Hi @Lasica, thanks for opening this conversation! We are now emphasizing %load_ext kedro.ipython #2777, #3619 and even though the kedro jupyter setup is not going anywhere for now, I don't think we are adding new features to it in the short term.

I'm converting this to a discussion for now.

@kedro-org kedro-org locked and limited conversation to collaborators Apr 4, 2024
@astrojuanlu astrojuanlu converted this issue into discussion #3779 Apr 4, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
Issue: Feature Request New feature or improvement to existing feature
Projects
None yet
Development

No branches or pull requests

2 participants