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

Clear the saved jupyter interpreter path if it fails to launch #2355

Closed
IanMatthewHuff opened this issue Feb 4, 2020 · 11 comments
Closed

Clear the saved jupyter interpreter path if it fails to launch #2355

IanMatthewHuff opened this issue Feb 4, 2020 · 11 comments
Assignees

Comments

@IanMatthewHuff
Copy link
Member

  1. Launch jupyter from an interpreter (you want it to be cached in the jupyter interpreter memento).
  2. Now remove that interpreter from your system
  3. Open a new workspace and point VSCode at a valid jupyter installed interpreter
  4. Try to execute a cell

Result:
Jupyter will not start. However you won't get a popup on this or a notification of what interpreter it was trying to use. You just get a call stack of our code (NativeEditor.startServer ect..) displayed in the output cell.

Expected:
Any of the following would help:

  1. Show the interpreter that we are trying to use, so I could at least tell what what happening
  2. Guide the user to the "Select Jupyter Interpreter" command for a failing cached interpreter
  3. Clear the saved interpreter if it fails so we move back to using the VSCode selected interpreter.
@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2020

I vote for number 3

@rchiodo
Copy link
Contributor

rchiodo commented Feb 4, 2020

This feels like a regression to me. It wouldn't have done this before

@IanMatthewHuff
Copy link
Member Author

Yeah, folks won't be removing interpreters all the time, but it's not that rare. And it's pretty bad when you get into this state. Plus the user has no idea that the first time they successfully launch Jupyter that they have set this internal setting.

@IanMatthewHuff IanMatthewHuff self-assigned this Feb 10, 2020
@IanMatthewHuff
Copy link
Member Author

Note. I was not able to repro the situation where I was failing and didn't see the missing dependencies popup. When I deleted or removed jupyter from the saved jupyter interpreter I always got the missing dependencies popup. So I added the target interpreter to that dialog (so the user can see what they are trying to use) and improved the help link.

@rchiodo
Copy link
Contributor

rchiodo commented Feb 11, 2020

Hmm. I can repro this if I set the jupyter interpreter to something that doesn't support it. Like a virtual env with jupyter.

@IanMatthewHuff
Copy link
Member Author

@rchiodo Sorry what's an example of this "Like a virtual env with jupyter." A virtual env with Jupyter installed should work just fine. Do you mean if you delete that env?

@rchiodo
Copy link
Contributor

rchiodo commented Feb 11, 2020

On windows I can't get a virtualenv (one created with venv) to work. I installed the default python from the store, then create a venv for juptyer, pip install jupyter and try running a notebook. The kernel will crash.

If you set this as your selected jupyter interpreter, we never recover.

@IanMatthewHuff
Copy link
Member Author

Hmm virtualenvs from venv work just fine for me. Not fully sure if I really want to fudge up my system by installing the default python. I'll try to check it out this afternoon.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Feb 12, 2020

Works for me.
Then again, I'm on a Mac

@rchiodo
Copy link
Contributor

rchiodo commented Feb 14, 2020

Validated. Removed jupyter from a selected interpreter that was already working and it just moved onto the new one automatically.

@DonJayamanne
Copy link
Contributor

Validated

@lock lock bot locked as resolved and limited conversation to collaborators Feb 28, 2020
@microsoft microsoft unlocked this conversation Nov 13, 2020
@DonJayamanne DonJayamanne transferred this issue from microsoft/vscode-python Nov 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 8, 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

3 participants