Skip to content
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

What do we do if user does not have kernel installed when running/opening a notebook #5864

Closed
DonJayamanne opened this issue May 13, 2021 · 9 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) notebook-getting-started verified Verification succeeded
Milestone

Comments

@DonJayamanne
Copy link
Contributor

DonJayamanne commented May 13, 2021

@claudiaregio /cc
Looks like we're running into this a lot

Proposed Solution/Questions:

  • Display non modal error message letting them know they do not have Python installed & would need it
    • Display a message similar to what Python extnsion displays
      Python is not installed. Please download and install Python before using the extension
  • Should this be a modal dialog
    • Probably not, nothing much the user can do apart from see the error and install it themselves.
    • Modal would probably make sense if we had a solution, all we can do here is provide a link.

Questions

  • User opens a .NET notebook & user doesn't have .NET kernel installed
    • What do we do?
  • User opens an R notebook & user doesn't have R kernel installed
    • What do we do?
    • Similar to .NET, but what if we don't kow about extensions that support Jupyter notebooks and have VS Code kernels for some languages? (e.g. we should not hardcode .NET, but how do we address it).
    • I guess this can only be done with some hardcoding
  • User opens a Python notebook and they don't have ANY kernel specs, and no python installed

@jmew /cc

@DonJayamanne DonJayamanne added the bug Issue identified by VS Code Team member as probable bug label May 13, 2021
@DonJayamanne DonJayamanne self-assigned this May 13, 2021
@rchiodo
Copy link
Contributor

rchiodo commented May 13, 2021

Ideas?

  • Use piodide. Yeah okay this is silly but might be good enough?
  • Offer to install python (well bring up a link to python.org)
  • Warn them that the kernel won't work

@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented May 13, 2021

arn them that the kernel won't work

Shouldn't we do the same for other non-python kernels? Let them know that they do not have a kernel installed that can handle this (only for non-pytohn kernels)

@rchiodo
Copy link
Contributor

rchiodo commented May 13, 2021

Shouldn't we do the same for other non-python kernels? Let them know that they do not have a kernel installed that can handle this (only for non-pytohn kernels)

Yeah that sounds like a good idea.

@joyceerhl
Copy link
Contributor

joyceerhl commented May 13, 2021

@DonJayamanne in this case, wouldn't the user not have any kernel selected for the current notebook? How is this a kernel start issue then? Under the kernel push model the user shouldn't even have access to the run button.

@DonJayamanne DonJayamanne changed the title What do we do if user does not have Python when attempting to run Python notebooks What do we do if user does not have kernel installed when running/opening a notebook May 13, 2021
@greazer greazer added the notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) label May 13, 2021
@greazer greazer added this to the June 2021 Release milestone May 13, 2021
@greazer
Copy link
Member

greazer commented May 13, 2021

We need at minimum an error message that gives some direction to the user. Especially if they don't have Python installed at all.

@DonJayamanne
Copy link
Contributor Author

This will require a lot of changes, hence moving back to backlog and leaving assigned so we discuss the technical implementation.

@rchiodo
Copy link
Contributor

rchiodo commented Jun 3, 2021

We could

  • always return the python default kernel
  • always have the same id for this default kernel (per URI?) same guid forever?
  • update this with the state of the actual preferred one when we find it
  • this same kernel would be used if there's no python/no python extension

@DonJayamanne DonJayamanne added the candidate Issue identified as probable candidate for fixing in the next release label Jun 10, 2021
@greazer greazer removed the candidate Issue identified as probable candidate for fixing in the next release label Jun 10, 2021
@DonJayamanne DonJayamanne self-assigned this Jun 10, 2021
@DonJayamanne
Copy link
Contributor Author

DonJayamanne commented Jul 13, 2021

  • If python is not installed have a kernel named Python 3
    • When user selects this and attempts to run the cell they'll be asked to either install Python extension or Python runtime
    • After installing Python extension (if python runtime is installed) user should not have to reload VS Code (the interpreters should be listed)
    • After installing Python, user will need to reload VS Code
    • TODO: File for API when this is detected by core extension.
  • For non python kernels
    • Do nothing, no point stating the obvious (the user won't see the kernel in the kernel picker, hence why add another way to state this fact)
  • What if user doesn't have any kernel spec?
    • Assume they are attempting to run R or something similar & just install this extension. How do they know they need to install a kernel. I.e. how do new users get started?

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug notebook-execution Kernels issues (start/restart/switch/execution, install ipykernel) notebook-getting-started verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants