-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Failed to activate Jupyter or create empty notebook #12183
Comments
This might be that when run in VS Code it is not running in a activated environment. Can you try this?
related #10626 |
Thanks a lot @karrtikr , this workaround does work. I hope there is a more permanent solution as this used to work till day-before yesterday without any need for workarounds. |
I am suspecting one of the three:
You can follow the prompts from "Extensions: Install Specific Version of Extension..." in the command palette: Or you can open the extensions side bar, click on the settings for the Python extension and pick "Install Another Version...": Unfortunately the issue you face is due to conda itself, that is not activating properly. Can you try to run that command
in terminal and see if it gives you the same error. |
Conda version has not been updated. The path is:
There may be something wrong here. Do you see something that I did not? No extension has been updated for at least 18 days Running:
gave no errors in command line. Visual Studio loaded after this command was still unable to find jupyter or load python. |
Two things,
This is to check if conda got activated in your terminal.
|
Although it's not related to the extension, this is likely because |
Pasted below. Blank. No output.
C:\Users\Anupam Saraph>C:/ProgramData/Anaconda3/Scripts/activate.bat C:\Users\Anupam Saraph>python -c"import sys;print(sys.executable)" C:\Users\Anupam Saraph>
C:\Users\Anupam Saraph> C:/ProgramData/Anaconda3/Scripts/activate.bat && echo 'e8b39361-0157-4923-80e1-22d70d46dee6' && python "c:\Users\Anupam Saraph.vscode\extensions\ms-python.python-2020.5.80290\pythonFiles\pyvsc-run-isolated.py" "c:/Users/Anupam Saraph/.vscode/extensions/ms-python.python-2020.5.80290/pythonFiles/printEnvVariables.py" C:\Users\Anupam Saraph> |
Thanks, this now loads python instead of the store when invoked from the command line! However this still fails to get Visual Studio to discover python and jupyter. |
This is really weird Anupam. What terminal are you using? Please open a command prompt terminal, and then send these commands. Also, please send a screenshot this time. |
Here is the screenshot. I see it is different from the output I sent you earlier. Is that because of the change I made in the path? |
Yes. Can you revert that change and then run this command? Also run the full command where we print environment variables. |
Here's the same command in visual studio: After running:
the terminal is back in visual studio. However the command to print environment variables results in the following: Now Visual Studio is declaring that the Datascience libraries jupyter and notebook are missing: Attempt to install locks up with the message: Installing jupyter through Anaconda as directed https://github.com/Microsoft/vscode-python/blob/master/PYTHON_INTERACTIVE_TROUBLESHOOTING.md did not make any difference It appears Visual Studio is altering truncating the path during the install and crashing as it can't find the path to install. Perhaps a similar bug has crept into the code attempting to load jupyter? |
Sorry this is taking so much time.
I didn't mean for you to remove it, but move it down the hierarchy back to where it was. This isn't the behavior you were seeing earlier, so it looks like things weren't restored properly.
After restoring you should see the above behavior & have the original
This is likely because the extension updated to
As this is something outside of the extension, I can't say why the response is empty for you.
This seems like a separate issue with installing. Looks like your username consists of a space character (Anupam Sarah), and the extension sends the wrong install command. The arguments in that command sent should be quoted (
So try quoting it and pasting the command. If you're still facing issues, please open up a new one regarding that. |
Here's the result of the modified command where you replaced 2020.5.80290 with 2020.5.86398 |
The updates to visual studio have clearly broken the paths wherever there is a space in the file or path name. #12284 Do you see any other reason this is broken? |
Well you can still workaround that by putting quotes around it, and install stuff. |
Yes, as the screenshots in #12284 indicate the install is not being recognized by visual studio. |
I don't see a screenshot with the command arguments wrapped around with quotes as I suggested. |
Here is the workaround #12284 (comment) |
That works too. Mine was much simpler, you just wrap the args around quotes. So what issue are you left with now? |
Your command allowed install jupyter but even after jupyter was installed, It failed to start jupyter in visual studio. So there is something still broken that gets fixed as long as I do a fresh install as I described here: #12284. I'm good for now, but there is a bug in the code that we haven't caught and will resurface. |
Alright, so I am closing for now. If the bug reoccurs, feel free to file a new issue or reopen this one. |
Bug: Notebook Editor, Interactive Window, Editor cells
Visual Studio fails to create empty jupyter notebook
Steps to cause the bug to occur
Actual behavior
Fails to launch jupyter
Expected behavior
Should launch jupyter
Your Jupyter and/or Python environment
Extension version: python|ms-|2020.5.80290
VS Code version:
Version: 1.45.1 (user setup)
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:27:35.169Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Windows_NT x64 10.0.18363
Setting python.jediEnabled: false
Setting python.languageServer: Microsoft
Python and/or Anaconda version: 3.7.6/1.0.1
OS: Windows | Mac | Linux (distro): Windows 10
Virtual environment: conda
Developer Tools Console Output
The text was updated successfully, but these errors were encountered: