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

Creating a new file foo.ipynb gives me a plain text code cell but the kernel is python 3 #129653

Closed
TylerLeonhardt opened this issue Jul 28, 2021 · 7 comments
Assignees
Milestone

Comments

@TylerLeonhardt
Copy link
Member

Testing #129463

Ok for this one I technically have the Jupyter extension installed...

In the workbench I created a foo.ipynb file and then opened that file. I do not have the Python extension installed but I do have the Jupyter extension installed.

image
A couple odd things I noticed:

  • I am given a plaintext cell that's runnable
  • the kernel is set to python and the cell is plaintext
  • the notification about the python extension (do I need it?)
@roblourens
Copy link
Member

roblourens commented Jul 28, 2021

An ipynb can hold any language, we try to default to python but only if the python extension is installed

// Default to python language only if the Python extension is installed.

@DonJayamanne why do this only if the Python extension is installed? Seems like python is better than nothing.

@TylerLeonhardt
Copy link
Member Author

@roblourens or at least default to Python if the kernel is Python 3?

@roblourens
Copy link
Member

roblourens commented Jul 28, 2021

Didn't you pick the kernel after creating the notebook? Or maybe we auto select the kernel in some case even when you haven't picked it yet... in which case it's still picked after the notebook was created and opened

@roblourens
Copy link
Member

We are also revamping the whole "new notebook" flow and this will probably all be improved in the future #128592

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jul 28, 2021

hy do this only if the Python extension is installed? Seems like python is better than nothing.

Majority of the notebook users are Python, hence we default to python.
FYI - we had code in our extnesion that:

  • keeps track of the language of the code cells of the last saved notebook.
  • Subsequent new notebooks would default to having an empty cell with that language, instead of plaintext

The goal of that is, if users work on Python notebooks most of the time, then new notebooks will have the first cell defaulting to python. I.e. less work for users, else they need to constantly change that.

Changing the kernel manually will result in the cells getting updated with the appropriate language. However that's not the best experience.
If a user wants to start typing code into a cell, the syntax highlithing is incorrect (not python or last used language), then they need to change this manually & then again select a kernel.

@roblourens
Copy link
Member

Majority of the notebook users are Python, hence we default to python.

Only if the Python extension is installed, I just want to remove that check

Changing the kernel manually will result in the cells getting updated with the appropriate language. However that's not the best experience.

I don't see that happening, but maybe it happens if the python extension is installed?

@rebornix rebornix removed their assignment Aug 2, 2021
@DonJayamanne DonJayamanne added this to the October 2021 milestone Oct 12, 2021
@DonJayamanne
Copy link
Contributor

Closing this issue as its been resolved:

  • When attempting to run you should be prompted to install an extension that contributes kernels
  • The language of the cell should change as you select a jupyter kernel (such as Python, R, Julia, etc)

@github-actions github-actions bot locked and limited conversation to collaborators Nov 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants